SetLocale()
Sets the country/language locale for CFML processing and the page returned to the client.
The locale value determines the default format of date, time, number, and currency values, according to language and regional conventions.
SetLocale( new_locale=locale );
Returns: Locale
Argument | Description |
---|---|
new_locale
locale,
required
|
The name of a locale; for example, "English (US)" Alias: locale |
Examples
dump(getLocale());
setLocale("english (australian)");
dump(getLocale());
dump(Server.Coldfusion.SupportedLocales.listToArray().sort("text"));
See also
- Date and time
- Internationalization
- GetLocale()
- GetLocaleInfo()
- Search Issue Tracker
- Search Lucee Test Cases (good for further, detailed examples)