Returns the language for the given 2 or 3 digit code.
Need to require ‘locale/info’ or ‘locale/language’.
# File lib/locale/info/language.rb, line 128 128: def get_language(code) 129: @@lang_three_codes[code] || @@lang_two_codes[code] 130: end
Returns the region for the given code.
You need to require ‘locale/info’ or ‘locale/info/region’.
# File lib/locale/info/region.rb, line 64 64: def get_region(code) 65: @@regions[code] 66: end
Returns the language code is valid.
Need to require ‘locale/info’ or ‘locale/language’.
# File lib/locale/info/language.rb, line 135 135: def language_code?(code) 136: get_language(code) != nil 137: end
Returns a hash of all the ISO regions. The hash is {String, Region} where the string is the 2 digit region code from the ISO 3166 data.
You need to require ‘locale/info’ or ‘locale/region’.
# File lib/locale/info/region.rb, line 57 57: def regions 58: @@regions 59: end
Returns a hash of all the ISO languages. The hash is {String, language} where the string is the 3 digit language code from the ISO 639 data. This contains all of the data from the ISO 639-3 data (7600 Languages).
Need to require ‘locale/info’ or ‘locale/language’.
# File lib/locale/info/language.rb, line 112 112: def three_languages 113: @@lang_three_codes 114: end
Returns a hash of all the ISO languages. The hash is {String, language} where the string is the 2 digit language code from the ISO 639-1 data. This contains all of the data from the ISO 639-1 data (186 Languages).
Need to require ‘locale/info’ or ‘locale/language’.
# File lib/locale/info/language.rb, line 121 121: def two_languages 122: @@lang_two_codes 123: end
Disabled; run with --debug to generate this.
Generated with the Darkfish Rdoc Generator 1.1.6.