OFPEC Forum
Editors Depot - Mission Editing and Scripting => OFP - Editing/Scripting General => Topic started by: macguba on 28 Feb 2005, 18:58:54
-
You know in Flashpoint Preferances you can set the language you want from a list? Is there any way of getting that information?
I want to detect if, for example, the player has chosen Spanish.
-
Easy. Create your own stringtable.csv file and put it in you mission directory.
LANGUAGE,English,French,Italian,Spanish,German,Czech
STR_LANGUAGE_CHECK,1,2,3,4,5,6Now you can check the selected language.
? localize "STR_LANGUAGE_CHECK" == "4" : hint "Spanish"
-
Clever boy! :)
-
Solve? ;D
-
Yes, I will in a day or so.
I always leave my threads open for a couple of days in case somebody has something interesting to add. Also, sometimes the answer is wrong and if you solve the thread straightaway you have to reopen it again, and in the meantime somebody has passed by with the right answer which they can't post, etc., etc., etc..
In this case the answer was spot on and has been used in the next version of my mission. Seems to work fine but not fully tested yet.
Thanks for the reminder. :)