@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

Tag

Language

Country or region

Locale

af

Afrikaans

Notes®

ar

Arabic

Notes® & AltName

ar-AE

Arabic

United Arab Emirates

Notes®

ar-BH

Arabic

Bahrain

Notes®

ar-DZ

Arabic

Algeria

Notes®

ar-EG

Arabic

Egypt

Notes®

ar-JO

Arabic

Jordan

Notes®

ar-KW

Arabic

Kuwait

Notes®

ar-LB

Arabic

Lebanon

Notes®

ar-MA

Arabic

Morocco

Notes®

ar-OM

Arabic

Oman

Notes®

ar-QA

Arabic

Qatar

Notes®

ar-SA

Arabic

Saudi Arabia

Notes®

ar-TN

Arabic

Tunisia

Notes®

ar-YE

Arabic

Yemen

Notes®

be

Byelorussian

Notes® & AltName

bg

Bulgarian

Notes® & AltName

ca

Catalan

Notes® & AltName

cs

Czech

Notes® & AltName

cy

Welsh

Notes® & AltName

da

Danish

Notes® & AltName

de

German

Notes® & AltName

de-AT

German

Austria

Notes®

de-CH

German

Switzerland

Notes®

de-DE

German

Germany

Notes®

de-LI

German

Liechtenstein

Notes®

de - LU

German

Luxembourg

Notes®

el

Greek

Notes® & AltName

en

English

Notes® & AltName

en-AU

English

Australia

Notes®

en-CA

English

Canada

Notes®

en-GB

English

United Kingdom

Notes®

en-HK

English

Hong Kong

Notes®

en-IE

English

Ireland

Notes®

en-IN

English

India

Notes®

en-JM

English

Jamaica

Notes®

en-NZ

English

New Zealand

Notes®

en-PH

English

Philippines

Notes®

en-SG

English

Singapore

Notes®

en-US

English

United States

Notes®

en-ZA

English

South Africa

Notes®

es

Spanish

Notes® & AltName

es-AR

Spanish

Argentina

Notes®

es-BO

Spanish

Bolivia

Notes®

es-CL

Spanish

Chile

Notes®

es-CO

Spanish

Colombia

Notes®

es-CR

Spanish

Costa Rica

Notes®

es-DO

Spanish

Dominican Republic

Notes®

es-EC

Spanish

Ecuador

Notes®

es-ES

Spanish

Spain

Notes®

es-GT

Spanish

Guatemala

Notes®

es-HN

Spanish

Honduras

Notes®

es-MX

Spanish

Mexico

Notes®

es-NI

Spanish

Nicaragua

Notes®

es-PA

Spanish

Panama

Notes®

es-PE

Spanish

Peru

Notes®

es-PR

Spanish

Puerto Rico

Notes®

es-PY

Spanish

Paraguay

Notes®

es-SV

Spanish

El Salvador

Notes®

es-US

Spanish

United States

Notes®

es-UY

Spanish

Uruguay

Notes®

es-VE

Spanish

Venezuela

Notes®

et

Estonian

Notes® & AltName

fi

Finnish

Notes® & AltName

fr

French

Notes® & AltName

fr-BE

French

Belgium

Notes®

fr-CA

French

Canada

Notes®

fr-CH

French

Switzerland

Notes®

fr-FR

French

France

Notes®

fr-LU

French

Luxembourg

Notes®

gu

Gujarati

Notes® & AltName

he

Hebrew

Notes® & AltName

hi

Hindi

Notes® & AltName

hr

Croatian

Notes® & AltName

hu

Hungarian

Notes® & AltName

id

Indonesian

Notes® & AltName

is

Icelandic

Notes® & AltName

it

Italian

Notes® & AltName

it-CH

Italian

Switzerland

Notes®

it-IT

Italian

Italy

Notes®

ja

Japanese

Notes® & AltName

kk

Kazakh

Notes® & AltName

ko

Korean

Notes® & AltName

lt

Lithuanian

Notes® & AltName

lv

Latvian

Notes® & AltName

mk

Macedonian

Notes® & AltName

mr

Marathi

Notes® & AltName

ms

Malay

AltName

ms-MY

Malay

Malaysia

Notes®

mt

Maltese

Notes® & AltName

nl

Dutch

Notes® & AltName

nl-BE

Dutch

Belgium

Notes®

nl-NL

Dutch

Netherlands

Notes®

no

Norwegian

Notes® & AltName

no - NO

Norwegian

Norway

Notes®

ny - NO

Nynorsk

Norway

Notes®

pl

Polish

Notes® & AltName

pt

Portuguese

Notes® & AltName

pt-BR

Portuguese

Brazil

Notes®

pt-PT

Portuguese

Portugal

Notes®

ro

Romanian

Notes® & AltName

ro - MD

Romanian

Moldavia

Notes®

ro - RO

Romanian

Romania

Notes®

ru

Russian

Notes® & AltName

sk

Slovak

Notes® & AltName

sl

Slovenian

Notes® & AltName

sq

Albanian

Notes® & AltName

sr

Serbian

Notes® & AltName

sv

Swedish

Notes® & AltName

ta

Tamil

Notes® & AltName

te

Telugu

Notes® & AltName

th

Thai

Notes® & AltName

tr

Turkish

Notes® & AltName

uk

Ukrainian

Notes® & AltName

vi

Vietnamese

Notes® & AltName

x-KOK

Konkani

Notes® & AltName

zh-CN

Chinese

China

Notes® & AltName

zh-HK

Chinese

Hong Kong

Notes®

zh-MO

Chinese

Macau

Notes®

zh-SG

Chinese

Singapore

Notes®

zh-TW

Chinese

Taiwan

Notes® & AltName

Examples

  1. The following formulas return "French."
    @Locale([LanguageName]; "fr")
    @Locale([LanguageName]; "fr-CA")
  2. The following formula returns "Canada."
    @Locale([CountryName]; "fr-CA")
  3. The following formula returns "French(Canada)."
    @Locale([LocaleName]; "fr-CA")
  4. The following formula returns "fr-CA."
    @Locale([NotesLocale]; "FR-CA")
  5. The following formula returns "fr."
    @Locale([AltNameLocale]; "FR-CA")
  6. The following formula returns a list of all the content language codes.
    @Locale([NotesLocale])
  7. The following formula returns a list of all the alternate user name language tags.
    @Locale([AltUserLocale])
  8. 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])