getLocale

Gets the current geographic/language locale value.
To set the default display format of date, time, number, and
currency values in a CFML application session, you use
the SetLocale function.

getLocale() → returns string

Compatibility

Lucee:

DEPRECATED since version 5 Lucee5+ Deprecated in favor of getLocaleInfo()

Examples sample code invoking the getLocale function


Output current Locale than set it to swiss locale

writeOutput(getlocale());
writeOutput(' → ');
setLocale('de_ch');
writeOutput(getlocale());

Expected Result: english (us) → german (swiss)


Fork me on GitHub