Locale
The locale or locales to use. If multiple locales are provided, the first one is tried first, falling back to the second one if the support for the first locale is not available, and so on for all provided locales. Locales may be provided as Unicode Locale Identifiers (a superset of IETF Language Tags ) or as enum values such as Locale.EnglishLocale,English (see above for the complete list). Multiple locales may be provided as multiple parameters and as arrays.
Returns
A locale based on the given parameters.
Returns a locale based on the given parameters. LOCALE ("en-US") LOCALE ("en-US") returns a locale for English as spoken in the United States, which is equivalent to Locale.EnglishUsLocale,EnglishUs.
Locales may be provided to functions like FORMAT to determine things like how numbers are converted to text, including what decimal separator is used.
The text strings provided to this function represent locales. For example, "de-AT" represents German, as used in Austria, and "en-GB" represents English, as used in the United Kingdom. They are known as Unicode Locale Identifiers, which are also used by JavaScript .
The most popular locales can be provided to functions by writing Locale.Locale,, followed by the name of the language and possibly a two-letter code identifying a region (including Locale.GermanAtLocale,GermanAt for German as spoken in Austria). If you go that route, there is often no need to use the LOCALE function. Refer to the table below for the complete list.
Fallback locales
All locales may not be available in all environments. If a locale is not available, fallback locales may be provided, which are used if a preferred locale is not available. For instance, consider this invocation:
The formula above specifies that the Navajo language should be used if possible, but that US English may be used if Navajo support is not available.
This formula specifies that Maori should be used if available, but that New Zealand English may be used as a fallback if Maori is not available:
Popular locales
A large number of popular locales may be provided by writing Locale.Locale,, followed by the names of this table:
| Formula | Unicode Locale Identifier | Description |
|---|---|---|
| Locale.ArabicLocale,Arabic | ar | Arabic |
| Locale.CzechLocale,Czech | cs | Czech |
| Locale.DanishLocale,Danish | da | Danish |
| Locale.DutchLocale,Dutch | nl | Dutch |
| Locale.DutchBeLocale,DutchBe | nl-BE | Dutch, as used in Belgium |
| Locale.EnglishLocale,English | en | English |
| Locale.EnglishAuLocale,EnglishAu | en-AU | English, as used in Australia |
| Locale.EnglishCaLocale,EnglishCa | en-CA | English, as used in Canada |
| Locale.EnglishInLocale,EnglishIn | en-IN | English, as used in India |
| Locale.EnglishNzLocale,EnglishNz | en-NZ | English, as used in New Zealand |
| Locale.EnglishUkLocale,EnglishUk | en-GB | English, as used in the United Kingdom |
| Locale.EnglishUsLocale,EnglishUs | en-US | English, as used in the United States of America |
| Locale.EnglishZaLocale,EnglishZa | en-ZA | English, as used in South Africa |
| Locale.FinnishLocale,Finnish | fi | Finnish |
| Locale.FrenchLocale,French | fr | French |
| Locale.FrenchBeLocale,FrenchBe | fr-BE | French, as used in Belgium |
| Locale.FrenchCaLocale,FrenchCa | fr-CA | French, as used in Canada |
| Locale.FrenchChLocale,FrenchCh | fr-CH | French, as used in Switzerland |
| Locale.GermanLocale,German | de | German |
| Locale.GermanChLocale,GermanCh | de-CH | German, as used in Switzerland |
| Locale.GreekLocale,Greek | el | Greek |
| Locale.IndonesianLocale,Indonesian | id | Indonesian |
| Locale.JapaneseLocale,Japanese | ja | Japanese |
| Locale.NorwegianLocale,Norwegian | nb | Norwegian (bokmål) |
| Locale.PersianLocale,Persian | fa | Persian |
| Locale.PolishLocale,Polish | pl | Polish |
| Locale.PortugueseLocale,Portuguese | pt | Portuguese |
| Locale.PortugueseBrLocale,PortugueseBr | pt-BR | Portuguese, as used in Brazil |
| Locale.SpanishLocale,Spanish | es | Spanish |
| Locale.SpanishArLocale,SpanishAr | es-AR | Spanish, as used in Argentina |
| Locale.SpanishMxLocale,SpanishMx | es-MX | Spanish, as used in Mexico |
| Locale.SwedishLocale,Swedish | sv | Swedish |
| Locale.TurkishLocale,Turkish | tr | Turkish |
Examples
Returns "24.2". A decimal point is used because the English locale has been specified.
Returns "24.2". A decimal point is used because the English locale has been specified. Locale.EnglishLocale,English is fully equivalent to LOCALE ("en") LOCALE ("en").
Returns "24,2", formatted using the rules for Northern Sami, falling back to Norwegian Bokmål if support for Northern Sami is not available.