OFPEC Forum
Editors Depot - Mission Editing and Scripting => ArmA - Editing/Scripting General => Topic started by: Goullou on 14 Apr 2008, 16:07:55
-
Hi there,
Does someone know a way to detect the language of ArmA currently used by a player in multi?
I already know all about the "localize" command and the "stringtable.csv" to localize the strings in different language but i would like to run different things in a script depending of the player language.
Is there a command returning the current selected language?
All ideas welcome...
-
hmm! Good question. Have you tried this:
_string1 = format ["%1", localize "STR_YourString"]; if (_string1 == "This is the English string") then {hint "English!"}; if (_string1 == "Tämä on suomenkielinen stringi") then {hint "Finnish!"}
AFAIK, localize "whatever" should return a simple string. I don't see any reason why you couldn't run a string-comparison to see what language is being run. You just gotta try it! Add two languages to your stringtable.csv, then try changing the language in the menu between tries. :)
Wolfrug out.