# 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.




### Syntax

```
getLocale() returns string
```







## CFML Engine Support

The getLocale function is supported on the following CFML engines:

| Engine | Minimum Version | Notes |
| --- | --- | --- |
| ColdFusion |  |  |
| Lucee |  | Lucee5+ Deprecated in favor of getLocaleInfo() |
| BoxLang | 1.0.0 |  |




## Examples


### Output current Locale than set it to swiss locale



```
writeOutput(getlocale());
writeOutput(' → ');
setLocale('de_ch');
writeOutput(getlocale());
```
Expected Result: english (us) → german (swiss)





## Related Tags and Functions

[getLocaleDisplayName](https://cfdocs.org/getLocaleDisplayName.md)
[GetLocaleInfo](https://cfdocs.org/GetLocaleInfo.md)
[getLocaleCountry](https://cfdocs.org/getLocaleCountry.md)
[getLocaleLanguage](https://cfdocs.org/getLocaleLanguage.md)




The human version of this document can be found here: [https://cfdocs.org/getlocale](https://cfdocs.org/getlocale) which is part of the cfdocs.org repository. Project created by [Pete Freitag](https://www.petefreitag.com) and sponsored by [Foundeo Inc.](https://foundeo.com/)
