OFPEC Forum

Editors Depot - Mission Editing and Scripting => OFP - Editing/Scripting General => Topic started by: macguba on 28 Feb 2005, 18:58:54

Title: Flashpoint Preferences - language
Post 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.
Title: Re:Flashpoint Preferences - language
Post by: AK-Chester on 28 Feb 2005, 20:54:12
Easy. Create your own stringtable.csv file and put it in you mission directory.
Code: [Select]
LANGUAGE,English,French,Italian,Spanish,German,Czech

STR_LANGUAGE_CHECK,1,2,3,4,5,6
Now you can check the selected language.
Code: [Select]
? localize "STR_LANGUAGE_CHECK" == "4" : hint "Spanish"
Title: Re:Flashpoint Preferences - language
Post by: macguba on 28 Feb 2005, 20:55:50
Clever boy!   :)
Title: Re:Flashpoint Preferences - language
Post by: Big Nasty on 01 Mar 2005, 03:00:18
Solve?  ;D
Title: Re:Flashpoint Preferences - language
Post by: macguba on 01 Mar 2005, 09:51:49
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.  :)