
Function: Set Locale
Introduced in ver 1.7.0.18
The set locale function is used to determine the sort order for strings that contain multi-byte UTF8 characters. Below is a table of the most used locale codes.
The ACF-Plugin handles UTF-8 text which is the standard FileMaker uses, without specifying the locale. However, in the case of sorting and comparing strings to determine order, the locale setting is important where multi-byte UTF8 characters are involved. If only ASCII strings (A-Z, 0-9 codes 0-127) are used, the locale setting is not important. The defaut locale is en_US.UTF8
Prototype:
set_locale (string language code);
Parameters:
Parameter name | Type | Description |
---|---|---|
Language code | string | The language code on the format: <language>_<COUNTRY>.UTF-8 |
Often used language codes
When specifying language codes in the set_locale function with a UTF-8 suffix, it's important to use the correct syntax, which typically follows the pattern <language>_<COUNTRY>.UTF-8
. This pattern specifies the language, country, and character encoding (UTF-8 in this case). It's important to use this format to ensure proper handling of character encoding, especially for non-ASCII characters.
Language Code | Country | Language |
---|---|---|
en_US.UTF-8 | United States | English |
en_GB.UTF-8 | United Kingdom | English |
fr_FR.UTF-8 | France | French |
de_DE.UTF-8 | Germany | German |
es_ES.UTF-8 | Spain | Spanish |
it_IT.UTF-8 | Italy | Italian |
pt_PT.UTF-8 | Portugal | Portuguese |
pt_BR.UTF-8 | Brazil | Portuguese |
ru_RU.UTF-8 | Russia | Russian |
ja_JP.UTF-8 | Japan | Japanese |
zh_CN.UTF-8 | China | Chinese |
zh_TW.UTF-8 | Taiwan | Chinese |
ar_SA.UTF-8 | Saudi Arabia | Arabic |
ko_KR.UTF-8 | South Korea | Korean |
nl_NL.UTF-8 | Netherlands | Dutch |
sv_SE.UTF-8 | Sweden | Swedish |
nb_NO.UTF-8 | Norway | Norwegian Bokmål |
nn_NO.UTF-8 | Norway | Norwegian Nynorsk |
da_DK.UTF-8 | Denmark | Danish |
fi_FI.UTF-8 | Finland | Finnish |
pl_PL.UTF-8 | Poland | Polish |
tr_TR.UTF-8 | Turkey | Turkish |
el_GR.UTF-8 | Greece | Greek |
he_IL.UTF-8 | Israel | Hebrew |
hi_IN.UTF-8 | India | Hindi |
zh_CN.UTF-8 | China | Chinese |
zh_TW.UTF-8 | Taiwan | Traditional Chinese |
ja_JP.UTF-8 | Japan | Japanese |
There are a lot more codes available. If you don't find yours in the list, send an email and we will find out.
Return value: No return value
Example:
// For Norwegian settings
set_locale ( "nb_NO.UTF8");