Xojo Developer Conference
25/27th April 2018 in Denver.
MBS Xojo Conference
6/7th September 2018 in Munich, Germany.

Platforms to show: All Mac Windows Linux Cross-Platform

FAQ.How to check on Mac OS which country or language is currently selected?
Answer: The code below returns a country value.
dim result as Integer


CONST smScriptLang = 28
CONST smSystemScript = -1

DECLARE FUNCTION GetScriptManagerVariable LIB "Carbon" ( selector as Integer) as Integer
DECLARE FUNCTION GetScriptVariable LIB "Carbon" ( script as Integer, selector as Integer) as Integer

result=GetScriptVariable(smSystemScript, smScriptLang)

Returns values like:

langEnglish0Roman script
langFrench1Roman script
langGerman2Roman script
langItalian3Roman script
langDutch4Roman script
langSwedish5Roman script
langSpanish6Roman script
langDanish7Roman script
langPortuguese8Roman script
langNorwegian9Roman script
langHebrew10Hebrew script
langJapanese11Japanese script
langArabic12Arabic script
langFinnish13Roman script
langGreek14Greek script using smRoman script code
langIcelandic15modified smRoman/Icelandic script
langMaltese16Roman script
langTurkish17modified smRoman/Turkish script
langCroatian18modified smRoman/Croatian script
langTradChinese19Chinese (Mandarin) in traditional characters
langUrdu20Arabic script
langHindi21Devanagari script
langThai22Thai script
langKorean23Korean script

For more values, check "Script.h" in the frameworks.

Feedback, Comments & Corrections

MBS FileMaker tutorial videos