module Locale::Info

def get_language(code)

Need to require 'locale/info' or 'locale/language'.

Returns the language for the given 2 or 3 digit code.
def get_language(code)
  @@lang_three_codes[code] || @@lang_two_codes[code]
end

def get_region(code)

You need to require 'locale/info' or 'locale/info/region'.

Returns the region for the given code.
def get_region(code)
  @@regions[code]
end

def language_code?(code)

Need to require 'locale/info' or 'locale/language'.

Returns the language code is valid.
def language_code?(code)
  get_language(code) != nil
end

def regions

You need to require 'locale/info' or 'locale/region'.

the string is the 2 digit region code from the ISO 3166 data.
Returns a hash of all the ISO regions. The hash is {String, Region} where
def regions
  @@regions
end

def three_languages

Need to require 'locale/info' or 'locale/language'.

all of the data from the ISO 639-3 data (7600 Languages).
the string is the 3 digit language code from the ISO 639 data. This contains
Returns a hash of all the ISO languages. The hash is {String, language} where
def three_languages
  @@lang_three_codes
end

def two_languages

Need to require 'locale/info' or 'locale/language'.

all of the data from the ISO 639-1 data (186 Languages).
the string is the 2 digit language code from the ISO 639-1 data. This contains
Returns a hash of all the ISO languages. The hash is {String, language} where
def two_languages
  @@lang_two_codes
end

def valid_region_code?(code)

You need to require 'locale/info' or 'locale/info/region'.

Returns the region code is valid.
def valid_region_code?(code)
  @@regions[code] != nil
end