Class | Locale::Tag::Common |
In: |
lib/locale/tag/common.rb
|
Parent: | Simple |
Common Language tag class for Ruby. Java and MS Windows use this format.
LANGUAGE | = | "(#{ALPHA}{2,3}|#{ALPHA}{4}|#{ALPHA}{5,8})" |
SCRIPT | = | "(#{ALPHA}{4})" |
VARIANT | = | "(#{ALPHANUM}{3,}|#{DIGIT}#{ALPHANUM}{3})" |
TAG_RE | = | /\A#{LANGUAGE}(?:[-_]#{SCRIPT})? (?:[-_]#{REGION})?((?:[-_]#{VARIANT})*)\Z/ix |
script | [R] | |
variants | [R] |
Returns an Array of tag-candidates order by priority. Use Locale.candidates instead of this method.
Locale::Tag::Rfc, Cldr don‘t have their own candidates, because it‘s meaningless to compare the extensions, privateuse, etc.