In order to avoid unnecessary overhead all methods throughout the framework accepting
a locale require it to be well-formed according to the structure laid out below. For
assuring the correct format use Locale::canonicalize() once on the locale.
However the methods within this class will also work with not-so-well-formed locales.
They accept both underscores and hyphens as separators between and don't care about the
case of the individual tags.
The identifier used by Lithium is based in its structure upon Unicode's
language identifier and is compliant to BCP 47.
language[_Script][_TERRITORY][_VARIANT]
- language The spoken language, here represented by an ISO 639-1 code,
where not available ISO 639-3 and ISO 639-5 codes are allowed too) tag.
The tag should be lower-cased and is required.
- Script The tag should have its first character capitalized, all others
lower-cased. The tag is optional.
- TERRITORY A geographical area, here represented by an ISO 3166-1 code.
Should be all upper-cased and is optional.
- VARIANT Should be all upper-cased and is optional.