User Guide

676 Chapter 3: ColdFusion Functions
SetLocale
Description
Sets the country/language locale for ColdFusion 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.
Returns
The locale value prior to setting the new locale, as a string.
Category
International functions, System functions
Function syntax
SetLocale(new_locale)
See also
GetHttpTimeString, GetLocale
History
ColdFusion MX:
Changed formatting behavior: this function might return a different value than in earlier
releases. This function uses Java standard locale determination and formatting rules on all
platforms.
Deprecated the Spanish (Mexican) locale option. It might not work, and it might cause an
error, in later releases.
Changed the Spanish (Modern) option: it now sets the locale to Spanish (Standard).
Parameters
Usage
You can specify the following locale names:
Parameter Description
new_locale The name of a locale; for example, "English (US)"
Chinese (China) French (Belgian) Korean
Chinese (Hong Kong) French (Canadian) Norwegian (Bokmal)
Chinese (Taiwan) French (Standard) Norwegian (Nynorsk)
Dutch (Belgian) French (Swiss) Portuguese (Brazilian)
Dutch (Standard) German (Austrian) Portuguese (Standard)
English (Australian) German (Standard) Spanish (Modern)
English (Canadian) German (Swiss) Spanish (Standard)
English (New Zealand) Italian (Standard) Swedish
English (UK) Italian (Swiss)
English (US) Japanese