Monday, November 26, 2018

Retrieve User preferred Language using SuiteScript

The current user's language (internal id: user_language) preference under - Home >Set Preferences > General tab >Localization > Language
can be retrieved using the script:

     nlapiGetContext().getPreference('language');

For reference, here is the list of the values returned:
LanguageValue
Chinese (Simplified)zh_CN
Chinese (Traditional)zh_TW
Danishda_DK
English (International)en
English (U.S.)en_US
French (Canada)fr_CA
French (France)fr_FR
Germande_DE
Italianit_IT
Japaneseja_JP
Koreanko_KR
Nederlandsnl_NL
Portuguese (Brazilian)pt_BR
Russianru_RU
Spanishes_ES
Swedishsv_SE
Thaith_TH

No comments:

Post a Comment