translation.Locale
JavaScript does not include an enumeration type. The SuiteScript 2.x documentation uses the term enumeration (or enum) to describe a plain JavaScript object with a flat, map-like structure. In this object, each key points to a read-only string value.
Enum Description |
Holds the string values for supported locales for Translation Collections. Use this enum to set the locale argument to translation.get(options), translation.selectLocale(options), and translation.load(options). This enum lists all locales that are enabled for a company. This enum also includes two special values: |
Module |
|
Sibling Object Members |
|
Since |
2019.1 |
Values
The following table lists all possible locale values and the respective languages. Typically, only some of these locales will be enabled for a company and available to use with Translation Collections.
Locale |
Language |
---|---|
|
Language currently set by the user |
|
Default company language |
|
Afrikaans (South Africa) |
|
Arabic |
|
Bulgarian (Bulgaria) |
|
Bengali (Bangladesh) |
|
Bosnian (Bosnia and Herzegovina) |
|
Czech (Czechia) |
|
Danish (Denmark) |
|
German (Germany) |
|
Greek (Greece) |
|
English |
|
English (Australia) |
|
English (Canada) |
|
English (United Kingdom) |
|
English (United States) |
|
Spanish (Argentina) |
|
Spanish (Spain) |
|
Estonian (Estonia) |
|
Farsi (Iran) |
|
Finnish (Finland) |
|
French (Canada) |
|
French (France) |
|
Gujarati (India) |
|
Hebrew (Israel) |
|
Hindi (India) |
|
Croatian (Croatia) |
|
Hungarian (Hungary) |
|
Armenian (Armenia) |
|
Indonesian (Indonesia) |
|
Icelandic (Iceland) |
|
Italian (Italy) |
|
Japanese (Japan) |
|
Kannada (India) |
|
Korean (Korea) |
|
Luxembourgish (Luxembourg) |
|
Lithuanian (Lithuania) |
|
Latvian (Latvia) |
|
Marathi (India) |
|
Malay (Malaysia) |
|
Dutch (Netherlands) |
|
Norwegian (Norway) |
|
Punjabi (India) |
|
Polish (Poland) |
|
Portuguese (Brazil) |
|
Portuguese (Portugal) |
|
Romanian (Romania) |
|
Russian (Russia) |
|
Serbian (Latin) |
|
Slovakian (Slovakia) |
|
Slovenian (Slovenia) |
|
Albanian (Albania) |
|
Serbian (Serbia) |
|
Swedish (Sweden) |
|
Tamil (India) |
|
Telugu (India) |
|
Thai (Thailand) |
|
Tagalog (Philippines) |
|
Turkish (Türkiye) |
|
Ukrainian (Ukraine) |
|
Vietnamese (Viet Nam) |
|
Chinese (Simplified) |
|
Chinese (Traditional) |
Syntax
The following code sample shows the syntax for this member. It is not a functional example. For a complete script example, see N/translation Module Script Samples.
// Add additional code
...
let myMsg = message.create({
title: translation.get({
collection: 'custcollection_my_strings',
key: 'MY_TITLE',
locale: translation.Locale.COMPANY_DEFAULT
})(),
message: translation.get({
collection: 'custcollection_my_strings',
key: 'MY_MESSAGE',
locale: translation.Locale.COMPANY_DEFAULT
})(),
type: message.Type.CONFIRMATION
});
...
// Add additional code