class Locale::TagList


of this function.
Locale.candidates to find the current locale instead
It is recommanded to use Locale.current or
This is the class for backward compatibility.
returns Locale::Object (similier with Locale::Tag::Posix).
But the old Locale.current(Ruby-GetText) and Locale.get
Locale.current returns an Array of Tag(s) now.
“Locale.current.language” is same with “Locale.current.language”.
the first(top priority) Locale::Tag object.
This provides the subclass of Array which behaves like

def charset

Returns the top priority charset. (posix)
def charset
  top_priority_charset = nil
  first_tag = self[0]
  if first_tag.respond_to?(:charset)
    top_priority_charset = first_tag.charset
  end
  top_priority_charset ||= ::Locale.driver_module.charset
  top_priority_charset
end

def country

Returns the top priority region/country. (simple)
def country
  self[0].region
end

def extensions

Returns the top priority extensions.(common, rfc, cldr)
def extensions
  (self[0].respond_to? :extensions) ? self[0].extensions : nil
end

def language

Returns the top priority language. (simple)
def language
  self[0].language
end

def modifier

Returns the top priority modifier. (posix)
def modifier
  (self[0].respond_to? :modifier) ? self[0].modifier : nil
end

def privateuse

Returns the top priority privateuse(rfc)
def privateuse
  (self[0].respond_to? :privateuse) ? self[0].privateuse : nil
end

def region

Returns the top priority region/country. (simple)
def region
  self[0].region
end

def script

Returns the top priority script. (common)
def script
  self[0].script
end

def to_cldr

def to_cldr
  self[0].to_cldr
end

def to_common

def to_common
  self[0].to_common
end

def to_posix

def to_posix
  self[0].to_posix
end

def to_rfc

def to_rfc
  self[0].to_rfc
end

def to_s

def to_s
  self[0].to_s
end

def to_simple

def to_simple
  self[0].to_simple
end

def to_str

def to_str
  self[0].to_str
end

def variants

Returns the top priority variants.(common, rfc, cldr)
def variants
  (self[0].respond_to? :variants) ? self[0].variants : nil
end