Class | Locale::Tag::Rfc
In: | lib/locale/tag/rfc.rb
Parent: | Locale::Tag::Common

Language tag class for RFC4646(BCP47).

### Methods

extensions= new parse privateuse=

### Included Modules

Util::Memoizable

### Constants

SINGLETON | = | '[a-wyz0-9]'
VARIANT | = | "(#{ALPHANUM}{5,8}|#{DIGIT}#{ALPHANUM}{3})"
EXTENSION | = | "(#{SINGLETON}(?:-#{ALPHANUM}{2,8})+)"
PRIVATEUSE | = | "(x(?:-#{ALPHANUM}{1,8})+)"
GRANDFATHERED | = | "#{ALPHA}{1,3}(?:-#{ALPHANUM}{2,8}){1,2}"
TAG_RE | = | /\A#{LANGUAGE}(?:-#{SCRIPT})? (?:-#{REGION})?((?:-#{VARIANT})* (?:-#{EXTENSION})*(?:-#{PRIVATEUSE})?)\Z/ix

### Attributes

extensions | [R] |
privateuse | [R] |

### Public Class methods

new(language, script = nil, region = nil, variants = [], extensions = [], privateuse = nil)
parse(tag)

Parse the language tag and return the new Locale::Tag::Rfc.

### Public Instance methods

extensions=(val)

Sets the extensions as an Array.

privateuse=(val)

Sets the privateuse as a String

[Validate]