Sets the locale.
Category: | Information and Conversion |
Returned data type: | String |
Note: | The returned value is a string of the current locale setting. |
This function affects certain operations such as converting and date operations. This function returns the previous locale. If no parameter is passed, the current locale is returned. The locale setting is a global setting. |
<string>locale(< >)
<string>locale(<"locale_string">)
If a parameter is specified, it is set. Otherwise, it is retrieved. If setting, the old locale is retrieved.
The following values can be set in the locale() function:
Here are some examples:
my_locale = locale("DEU")
my_locale = locale("German")
my_locale = locale("German_Germany")
my_locale = locale("German_Germany.1252")
The locale() function returns the current setting using Country_Language.codepage notations.
Note: If you use ("iso8601")
, the date is set in the ISO8601 format.
string currentSetting
string newSetting
currentSetting = locale();
newSetting = locale("FRA");