Macro language_tags::langtag [−][src]
macro_rules! langtag {
($language : expr) => { ... };
($language : expr ; ; ; $region : expr) => { ... };
($language : expr ; ; $script : expr) => { ... };
($language : expr ; ; $script : expr ; $region : expr) => { ... };
($language : expr ; $extlangs : expr) => { ... };
($language : expr ; $extlangs : expr ; $script : expr) => { ... };
($language : expr ; $extlangs : expr ; ; $region : expr) => { ... };
($language : expr ; $extlangs : expr ; $script : expr ; $region : expr) => { ... };
}
Expand description
Utility for creating simple language tags.
The macro supports the language, exlang, script and region parts of language tags, they are separated by semicolons, omitted parts are denoted with mulitple semicolons.
Examples
it
:langtag!(it)
it-LY
:langtag!(it;;;LY)
it-Arab-LY
:langtag!(it;;Arab;LY)
ar-afb
:langtag!(ar;afb)
i-enochian
:langtag!(i-enochian)