Class | Locale::TagList
In: | lib/locale/taglist.rb
Parent: | Array

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.

### Methods

charset country extensions language modifier privateuse region script to_cldr to_common to_posix to_rfc to_s to_simple to_str variants

### Included Modules

Util::Memoizable

### Public Instance methods

charset()

Returns the top priority charset. (posix)

country()

Returns the top priority region/country. (simple)

extensions()

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

language()

Returns the top priority language. (simple)

modifier()

Returns the top priority modifier. (posix)

privateuse()

Returns the top priority privateuse(rfc)

region()

Returns the top priority region/country. (simple)

script()

Returns the top priority script. (common)

to_cldr()
to_common()
to_posix()
to_rfc()
to_s()
to_simple()
to_str()
variants()

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

[Validate]