Difference between revisions of "locale.name"
Jump to navigation
Jump to search
m (→Syntax) |
|||
(3 intermediate revisions by the same user not shown) | |||
Line 1: | Line 1: | ||
− | locale.'''name''' is a function that is part of the Locale Library. | + | locale.'''name''' is a function that is part of the Locale Library. <br /> |
− | + | This returns the name of the current locale. It normally returns a two-letter language code, but in some cases it also contains a two-letter country code (ISO-639). | |
− | + | For instance: en, fr, it, de, es, nl, nl_BE, en_GB | |
== Syntax == | == Syntax == | ||
− | locale.'''name | + | locale.'''name'''()<br> |
− | + | (No arguments) | |
== Example == | == Example == | ||
− | <source lang="lua"> | + | <source lang="lua">currentLang = locale.name() --Puts the current locale name in currentLang</source> |
<br> | <br> | ||
[[Category:locale]] | [[Category:locale]] |
Latest revision as of 06:28, 6 August 2011
locale.name is a function that is part of the Locale Library.
This returns the name of the current locale. It normally returns a two-letter language code, but in some cases it also contains a two-letter country code (ISO-639).
For instance: en, fr, it, de, es, nl, nl_BE, en_GB
Syntax
locale.name()
(No arguments)
Example
currentLang = locale.name() --Puts the current locale name in currentLang