Difference between revisions of "locale.name"

From Inspired-Lua Wiki
Jump to navigation Jump to search
Line 9: Line 9:
 
locale.'''name()'''<br> returns the name of the current local. It normally returns a two-letter language code, but in some cases it also contains a two-letter country code (ISO-639).  
 
locale.'''name()'''<br> returns the name of the current local. 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, nl_be, fr_be
+
For instance: en, fr, it, de, es, nl, nl_BE, en_GB
  
 
== Example ==
 
== Example ==

Revision as of 17:06, 4 August 2011

locale.name is a function that is part of the Locale Library.


The function returns the name of the current locale.

Syntax

locale.name()
returns the name of the current local. 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

Example

lang = locale.name() --Puts the current locale name in lang