Difference between revisions of "Os.setlocale"

From GiderosMobile
(Created page with "__NOTOC__ '''Available since:''' Gideros 2011.6<br/> === Description === Sets the current locale of the program. locale is a string specifying a locale; category is an optiona...")
 
Line 10: Line 10:
 
  When called with nil as the first argument, this function only returns the name of the current locale for the given category.
 
  When called with nil as the first argument, this function only returns the name of the current locale for the given category.
 
<source lang="lua">
 
<source lang="lua">
(string), = os.setlocale(localecategory,)
+
(string) = os.setlocale(locale,category)
 
</source>
 
</source>
'''locale:''' (string) locale to set ''''''<br/>
+
'''locale''': (string) locale to set ''''''<br/>
'''category:''' (string) category to change '''optional'''<br/>
+
'''category''': (string) category to change '''optional'''<br/>
 
'''Returns''' (string) name if current locale<br/>
 
'''Returns''' (string) name if current locale<br/>

Revision as of 11:21, 23 August 2018

Available since: Gideros 2011.6

Description

Sets the current locale of the program. locale is a string specifying a locale; category is an optional string describing which category to change: "all", "collate", "ctype", "monetary", "numeric", or "time"; the default category is "all". The function returns the name of the new locale, or nil if the request cannot be honored.


If locale is the empty string, the current locale is set to an implementation-defined native locale. If locale is the string "C", the current locale is set to the standard C locale. 


When called with nil as the first argument, this function only returns the name of the current locale for the given category.
(string) = os.setlocale(locale,category)

'locale: (string) locale to set '
category: (string) category to change optional
Returns (string) name if current locale