Name
SetLocale
Synopsis
SetLocale(newlocale
)
Changes the current locale used by ColdFusion to
newlocale
for the duration of the current
session. Returns the old locale so that it can be used again if
necessary. Valid entries for newlocale
include the following:
Dutch (Belgian) |
French (Canadian) |
Norwegian (Bokmal) |
Dutch (Standard) |
French (Standard) |
Norwegian (Nynorsk) |
English (Australian) |
French (Swiss) |
Portuguese (Brazilian) |
English (Canadian) |
German (Austrian) |
Portuguese (Standard) |
English (New Zealand) |
German (Standard) |
Spanish (Mexican) |
English (United Kingdom) |
German (Swiss) |
Spanish (Modern) |
English (United States) |
Italian (Standard) |
Spanish (Standard) |
French (Belgian) |
Italian (Swiss) |
Swedish |
The following example changes the current locale to Swedish:
<CFOUTPUT> Default Locale: #GetLocale( )# <P>Changing locale to Swedish... <CFSET OldLocale = SetLocale("Swedish")> <P>New Locale: #GetLocale( )#<BR> Old Locale: #OldLocale# </CFOUTPUT>
Get Programming ColdFusion now with the O’Reilly learning platform.
O’Reilly members experience books, live events, courses curated by job role, and more from O’Reilly and nearly 200 top publishers.