Platforms to show: All Mac Windows Linux Cross-Platform
FAQ.How to check on Mac OS which country or language is currently selected?
Feedback.
Answer: The code below returns a country value.
Example:
Notes:
Returns values like:
For more values, check "Script.h" in the frameworks.
Feedback.
Answer: The code below returns a country value.
Example:
dim result as integer
IF TargetMacOS THEN
CONST smScriptLang = 28
CONST smSystemScript = -1
#IF TargetCarbon
DECLARE FUNCTION GetScriptManagerVariable LIB "CarbonLib" ( selector as integer) as integer
DECLARE FUNCTION GetScriptVariable LIB "CarbonLib" ( script as integer, selector as integer) as integer
#else
DECLARE FUNCTION GetScriptManagerVariable LIB "InterfaceLib" ( selector as integer) as integer
DECLARE FUNCTION GetScriptVariable LIB "InterfaceLib" ( script as integer, selector as integer) as integer
#endif
result=GetScriptVariable(smSystemScript, smScriptLang)
END IF
Returns values like:
| langEnglish | 0 | Roman script |
| langFrench | 1 | Roman script |
| langGerman | 2 | Roman script |
| langItalian | 3 | Roman script |
| langDutch | 4 | Roman script |
| langSwedish | 5 | Roman script |
| langSpanish | 6 | Roman script |
| langDanish | 7 | Roman script |
| langPortuguese | 8 | Roman script |
| langNorwegian | 9 | Roman script |
| langHebrew | 10 | Hebrew script |
| langJapanese | 11 | Japanese script |
| langArabic | 12 | Arabic script |
| langFinnish | 13 | Roman script |
| langGreek | 14 | Greek script using smRoman script code |
| langIcelandic | 15 | modified smRoman/Icelandic script |
| langMaltese | 16 | Roman script |
| langTurkish | 17 | modified smRoman/Turkish script |
| langCroatian | 18 | modified smRoman/Croatian script |
| langTradChinese | 19 | Chinese (Mandarin) in traditional characters |
| langUrdu | 20 | Arabic script |
| langHindi | 21 | Devanagari script |
| langThai | 22 | Thai script |
| langKorean | 23 | Korean script |
For more values, check "Script.h" in the frameworks.
Links
MBS REAL studio tutorial videos - JUZ Nickenich