How to get language informations (python)?

Caesium

Radiant!
Joined
Jan 14, 2006
Messages
526
How do I get language information via python and what are the results for this command?
For example, what shall I do if I want to know if I play the english or the german version?
 
I presume you mean for translations?

I'm not sure it's possible, but if you used the TXT_KEY_blah_blah system that Firaxis has set up then it will display the right translation based on language.
 
That'S right, and I use it throughout my whole mod, because I'm merging many mods to one new mod, and, though I'm german, I actually ttranslate all the "pure-english" mods into multilanguage mods. But in one mod there is a decision between "a" like in "a wall" and "an" like in "an apple". So I wanted to write an if sequence that only adds "a" or "an" if the language is english.
 
Code:
language=CyGame().getCurrentLanguage()

the result is 0 : english , 1 : french , 2 : german , 3 : italian , 4 : spanish .

i don't know for others languages how that's work .

Tcho !
 
Top Bottom