Parent

Included Modules

Locale::TagList

This provides the subclass of Array which behaves like the first(top priority) Locale::Tag object. “Locale.current.language” is same with “Locale.current[0].language”.

Locale.current returns an Array of Tag(s) now. But the old Locale.current(Ruby-GetText) and Locale.get returns Locale::Object (similier with Locale::Tag::Posix). This is the class for backward compatibility.

It is recommanded to use Locale.current[0] or Locale.candidates to find the current locale instead of this function.

Public Instance Methods

charset() click to toggle source

Returns the top priority charset. (posix)

    # File lib/locale/taglist.rb, line 48
48:     def charset
49:       if self[0].respond_to? :charset
50:         self[0].charset
51:       else
52:         ::Locale.driver_module.charset
53:       end
54:     end
country() click to toggle source

Returns the top priority region/country. (simple)

    # File lib/locale/taglist.rb, line 36
36:     def country
37:       self[0].region
38:     end
extensions() click to toggle source

Returns the top priority extensions.(common, rfc, cldr)

    # File lib/locale/taglist.rb, line 70
70:     def extensions
71:       (self[0].respond_to? :extensions) ? self[0].extensions : nil
72:     end
language() click to toggle source

Returns the top priority language. (simple)

    # File lib/locale/taglist.rb, line 32
32:     def language
33:       self[0].language
34:     end
modifier() click to toggle source

Returns the top priority modifier. (posix)

    # File lib/locale/taglist.rb, line 58
58:     def modifier
59:       (self[0].respond_to? :modifier) ? self[0].modifier : nil
60:     end
privateuse() click to toggle source

Returns the top priority privateuse(rfc)

    # File lib/locale/taglist.rb, line 76
76:     def privateuse
77:       (self[0].respond_to? :privateuse) ? self[0].privateuse : nil
78:     end
region() click to toggle source

Returns the top priority region/country. (simple)

    # File lib/locale/taglist.rb, line 40
40:     def region
41:       self[0].region
42:     end
script() click to toggle source

Returns the top priority script. (common)

    # File lib/locale/taglist.rb, line 44
44:     def script
45:       self[0].script
46:     end
to_cldr() click to toggle source
     # File lib/locale/taglist.rb, line 101
101:     def to_cldr
102:       self[0].to_cldr
103:     end
to_common() click to toggle source
    # File lib/locale/taglist.rb, line 89
89:     def to_common
90:       self[0].to_common
91:     end
to_posix() click to toggle source
     # File lib/locale/taglist.rb, line 105
105:     def to_posix
106:       self[0].to_posix
107:     end
to_rfc() click to toggle source
    # File lib/locale/taglist.rb, line 97
97:     def to_rfc
98:       self[0].to_rfc
99:     end
to_s() click to toggle source
    # File lib/locale/taglist.rb, line 85
85:     def to_s
86:       self[0].to_s
87:     end
to_simple() click to toggle source
    # File lib/locale/taglist.rb, line 93
93:     def to_simple
94:       self[0].to_simple
95:     end
to_str() click to toggle source
    # File lib/locale/taglist.rb, line 81
81:     def to_str
82:       self[0].to_str
83:     end
variants() click to toggle source

Returns the top priority variants.(common, rfc, cldr)

    # File lib/locale/taglist.rb, line 64
64:     def variants
65:       (self[0].respond_to? :variants) ? self[0].variants : nil
66:     end

Disabled; run with --debug to generate this.

[Validate]

Generated with the Darkfish Rdoc Generator 1.1.6.