[HELP] change language in runtime along with translated Gui

Started by rmonic79, Fri 12/06/2015 17:19:33

Previous topic - Next topic

rmonic79

Hi guys we were able to change language in runtime but not the nine verb translated gui. The translation is on the way and we need to solve this problem.
Can someone help?

Snarky

If you're displaying the GUI as sprites (i.e. not just buttons with the button text set), you need to write some code that checks the value of the Game.TranslationFilename property, and changes out the graphics accordingly.

(This strikes me as not a great system, since it ties you to a specific file name for the translation. That means that you can't, for instance, use version numbers in the translation file. It would be better if the translation file had some property where you could specify the language, which you could then check within AGS. But that's not possible with AGS at the moment, so you just have to use the file name.)

Khris

With the 9 verb template you can easily switch the buttons by doing this:

Code: ags
  // switch to German
  lang = eLangDE;
  AdjustLanguage();


Natively supported languages are: eLangEN, eLangDE, eLangES, eLangIT, eLangFR

SMF spam blocked by CleanTalk