Game Language Depending on Played Civilization

Androrc the Orc

Emperor
Joined
Apr 19, 2004
Messages
1,621
Location
Vienna, Austria
So, basically what I want is that the game language change depending on the civilization being played. For instance, when playing Austria the game language should be German. So, I added an "iLanguage" field for civilizations, and then in CvPlayer.cpp added this right in the start of SetTurnActive (so that when the player's turn starts, the correct language is set):

Code:
gDLL->setCurrentLanguage(GC.getCivilizationInfo(getCivilizationType()).getLanguage());

It isn't working correctly though, and when I manually change the language to something else, it is set back to English at the start of the turn, even though it should set it to German.
 
There's a significant (1 or 2 seconds) pause while changing the language as it has to reparse all the CIV4GameText XML files. Assuming you can get this to work, are you sure you want this happening as each player begins their turn?
 
There's a significant (1 or 2 seconds) pause while changing the language as it has to reparse all the CIV4GameText XML files. Assuming you can get this to work, are you sure you want this happening as each player begins their turn?

Another option would be to do that for the player's chosen civilization in a scenario / random map on game start. I don't know where the code for that would be located though.
 
Top Bottom