Module: Locale::Info

### Home Classes Methods

### In Files

- lib/locale/info/language.rb
- lib/locale/info/region.rb

### Namespace

- CLASS Locale::Info::Language
- CLASS Locale::Info::Region

### Methods

- #get_language
- #get_region
- #language_code?
- #regions
- #three_languages
- #two_languages
- #valid_region_code?

### Class/Module Index

Quicksearch

- Locale
- Locale::Driver
- Locale::Driver::CGI
- Locale::Driver::Env
- Locale::Driver::Env::Private
- Locale::Driver::JRuby
- Locale::Driver::Posix
- Locale::Driver::Win32
- Locale::Driver::Win32::Kernel32
- Locale::Driver::Win32Table
- Locale::Info
- Locale::Info::Language
- Locale::Info::Region
- Locale::Middleware
- Locale::Tag
- Locale::Tag::Cldr
- Locale::Tag::Common
- Locale::Tag::Irregular
- Locale::Tag::Posix
- Locale::Tag::Rfc
- Locale::Tag::Simple
- Locale::TagList

No matching classes.

# Locale::Info

### Public Instance Methods

get_language(code) click to toggle source

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 127
    def get_language(code)
      @@lang_three_codes[code] || @@lang_two_codes[code]
    end

get_region(code) click to toggle source

Returns the region for the given code.

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

    # File lib/locale/info/region.rb, line 63
    def get_region(code)
      @@regions[code]
    end

language_code?(code) click to toggle source

Returns the language code is valid.

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

    # File lib/locale/info/language.rb, line 134
    def language_code?(code)
      get_language(code) != nil
    end

regions() click to toggle source

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 56
    def regions
      @@regions
    end

three_languages() click to toggle source

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 111
    def three_languages
      @@lang_three_codes
    end

two_languages() click to toggle source

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 120
    def two_languages
      @@lang_two_codes
    end

valid_region_code?(code) click to toggle source

Returns the region code is valid.

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

    # File lib/locale/info/region.rb, line 70
    def valid_region_code?(code)
      @@regions[code] != nil
    end

[Validate]

Generated with the Darkfish Rdoc Generator 2.