Skip to main content

@Locale (Formula Language)

Returns information about language codes.

Note: This @function is new with Release 5.

Syntax

@Locale( [ action ] )

@Locale( [ action ] ; locale-tag )

Parameters

[ action ]

Keyword. One of the following:

[NotesLocale] without locale-tag returns a text list containing all the content language codes.

[NotesLocale] with locale-tag returns a text list or value containing each specified content language code, or a null string if the code is not recognized. A code is recognized if it is exact regardless of case. If the language is recognized but not the country or region, the language code alone is returned.

[AltNameLocale] without locale-tag returns a text list containing all the alternate name language codes.

[AltNameLocale] with locale-tag returns a text list or value containing each specified alternate user language code, or a null string if the code is not recognized. A code is recognized if it is exact regardless of case. The country or region is ignored where it is not part of the alternate user language code (most cases).

[LanguageName] with locale-tag returns a text list or value spelling out the language for each specified language code, or a null string if the code is not recognized.

[CountryName] with locale-tag returns a text list or value spelling out the country or region for each specified language code, or a null string if the code has no country or region, or it is not recognized.

[LocaleName] with locale-tag returns a text list or value spelling out the language and country (or region), if applicable, for each specified language code, or a null string if the code is not recognized. The country or region is in parentheses and immediately (no space) follows the language.

[LocaleName] : [NotesLocale] (concatenating these two keywords) returns a text list containing, for each content language code, the language name, the country or region name in parentheses, a vertical bar, and the language code. This list can be used in a keyword field where the locale name is the name and the language code is the alias.

[LocaleName] : [AltNameLocale] (concatenating these two keywords) returns a text list containing, for each alternate name language code, the language name, the country or region name in parentheses, a vertical bar, and the language tag. This list can be used in a keyword field where the locale name is the name and the language code is the alias.

locale-tag

Text or text list. A language code or list of language codes.

Supported language codes

TagLanguageCountry or regionLocale
afAfrikaansNotes®
arArabicNotes® & AltName
ar-AEArabicUnited Arab EmiratesNotes®
ar-BHArabicBahrainNotes®
ar-DZArabicAlgeriaNotes®
ar-EGArabicEgyptNotes®
ar-JOArabicJordanNotes®
ar-KWArabicKuwaitNotes®
ar-LBArabicLebanonNotes®
ar-MAArabicMoroccoNotes®
ar-OMArabicOmanNotes®
ar-QAArabicQatarNotes®
ar-SAArabicSaudi ArabiaNotes®
ar-TNArabicTunisiaNotes®
ar-YEArabicYemenNotes®
beByelorussianNotes® & AltName
bgBulgarianNotes® & AltName
caCatalanNotes® & AltName
csCzechNotes® & AltName
cyWelshNotes® & AltName
daDanishNotes® & AltName
deGermanNotes® & AltName
de-ATGermanAustriaNotes®
de-CHGermanSwitzerlandNotes®
de-DEGermanGermanyNotes®
de-LIGermanLiechtensteinNotes®
de - LUGermanLuxembourgNotes®
elGreekNotes® & AltName
enEnglishNotes® & AltName
en-AUEnglishAustraliaNotes®
en-CAEnglishCanadaNotes®
en-GBEnglishUnited KingdomNotes®
en-HKEnglishHong KongNotes®
en-IEEnglishIrelandNotes®
en-INEnglishIndiaNotes®
en-JMEnglishJamaicaNotes®
en-NZEnglishNew ZealandNotes®
en-PHEnglishPhilippinesNotes®
en-SGEnglishSingaporeNotes®
en-USEnglishUnited StatesNotes®
en-ZAEnglishSouth AfricaNotes®
esSpanishNotes® & AltName
es-ARSpanishArgentinaNotes®
es-BOSpanishBoliviaNotes®
es-CLSpanishChileNotes®
es-COSpanishColombiaNotes®
es-CRSpanishCosta RicaNotes®
es-DOSpanishDominican RepublicNotes®
es-ECSpanishEcuadorNotes®
es-ESSpanishSpainNotes®
es-GTSpanishGuatemalaNotes®
es-HNSpanishHondurasNotes®
es-MXSpanishMexicoNotes®
es-NISpanishNicaraguaNotes®
es-PASpanishPanamaNotes®
es-PESpanishPeruNotes®
es-PRSpanishPuerto RicoNotes®
es-PYSpanishParaguayNotes®
es-SVSpanishEl SalvadorNotes®
es-USSpanishUnited StatesNotes®
es-UYSpanishUruguayNotes®
es-VESpanishVenezuelaNotes®
etEstonianNotes® & AltName
fiFinnishNotes® & AltName
frFrenchNotes® & AltName
fr-BEFrenchBelgiumNotes®
fr-CAFrenchCanadaNotes®
fr-CHFrenchSwitzerlandNotes®
fr-FRFrenchFranceNotes®
fr-LUFrenchLuxembourgNotes®
guGujaratiNotes® & AltName
heHebrewNotes® & AltName
hiHindiNotes® & AltName
hrCroatianNotes® & AltName
huHungarianNotes® & AltName
idIndonesianNotes® & AltName
isIcelandicNotes® & AltName
itItalianNotes® & AltName
it-CHItalianSwitzerlandNotes®
it-ITItalianItalyNotes®
jaJapaneseNotes® & AltName
kkKazakhNotes® & AltName
koKoreanNotes® & AltName
ltLithuanianNotes® & AltName
lvLatvianNotes® & AltName
mkMacedonianNotes® & AltName
mrMarathiNotes® & AltName
msMalayAltName
ms-MYMalayMalaysiaNotes®
mtMalteseNotes® & AltName
nlDutchNotes® & AltName
nl-BEDutchBelgiumNotes®
nl-NLDutchNetherlandsNotes®
noNorwegianNotes® & AltName
no - NONorwegianNorwayNotes®
ny - NONynorskNorwayNotes®
plPolishNotes® & AltName
ptPortugueseNotes® & AltName
pt-BRPortugueseBrazilNotes®
pt-PTPortuguesePortugalNotes®
roRomanianNotes® & AltName
ro - MDRomanianMoldaviaNotes®
ro - RORomanianRomaniaNotes®
ruRussianNotes® & AltName
skSlovakNotes® & AltName
slSlovenianNotes® & AltName
sqAlbanianNotes® & AltName
srSerbianNotes® & AltName
svSwedishNotes® & AltName
taTamilNotes® & AltName
teTeluguNotes® & AltName
thThaiNotes® & AltName
trTurkishNotes® & AltName
ukUkrainianNotes® & AltName
viVietnameseNotes® & AltName
x-KOKKonkaniNotes® & AltName
zh-CNChineseChinaNotes® & AltName
zh-HKChineseHong KongNotes®
zh-MOChineseMacauNotes®
zh-SGChineseSingaporeNotes®
zh-TWChineseTaiwanNotes® & AltName

Examples

  1. The following formulas return "French."
@Locale([LanguageName]; "fr")
@Locale([LanguageName]; "fr-CA")
  1. The following formula returns "Canada."
@Locale([CountryName]; "fr-CA")
  1. The following formula returns "French(Canada)."
@Locale([LocaleName]; "fr-CA")
  1. The following formula returns "fr-CA."
@Locale([NotesLocale]; "FR-CA")
  1. The following formula returns "fr."
@Locale([AltNameLocale]; "FR-CA")
  1. The following formula returns a list of all the content language codes.
@Locale([NotesLocale])
  1. The following formula returns a list of all the alternate user name language tags.
@Locale([AltUserLocale])
  1. The following field keyword formula returns a list of each content language code preceded by its locale name and a vertical bar. This formula allows the user to select from a list of names and stores the corresponding language code (which is an alias to the name).
@Locale([LocaleName] : [NotesLocale])

It is equivalent to:

@Locale([LocaleName]; @Locale([NotesLocale]))
+ "|" + @Locale([NotesLocale])