Difference between revisions of "Os.setlocale"

From GiderosMobile
 
(4 intermediate revisions by 2 users not shown)
Line 1: Line 1:
 
__NOTOC__
 
__NOTOC__
<languages />
+
'''Available since:''' Gideros 2011.6<br/>
'''<translate>Available since</translate>:''' Gideros 2011.6<br/>
+
'''Class:''' [[os]]<br/>
'''<translate>Class</translate>:''' [[Special:MyLanguage/os|os]]<br/>
 
=== <translate>Description</translate> ===
 
<translate>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.
 
  
 +
=== 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"
 +
<syntaxhighlight lang="lua">
 +
(string) = os.setlocale(locale,category)
 +
</syntaxhighlight>
  
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.  
+
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.</translate>
+
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">
+
 
(string) = os.setlocale(locale,category)
+
=== Parameters ===
</source>
+
'''locale''': (string) locale to set<br/>
=== <translate>Parameters</translate> ===
+
'''category''': (string) category to change '''optional'''<br/>
'''locale''': (string) <translate>locale to set</translate> <br/>
+
 
'''category''': (string) <translate>category to change</translate> '''optional'''<br/>
+
=== Return values ===
=== <translate>Return values</translate> ===
+
'''Returns''' (string) name if current locale<br/>
'''<translate>Returns</translate>''' (string) <translate>name if current locale</translate><br/>
+
 
 +
{{Os}}

Latest revision as of 22:23, 14 October 2023

Available since: Gideros 2011.6
Class: os

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"
(string) = os.setlocale(locale,category)

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.

Parameters

locale: (string) locale to set
category: (string) category to change optional

Return values

Returns (string) name if current locale