Adventure Game Studio

AGS Support => Beginners' Technical Questions => Topic started by: rmonic79 on Fri 12/06/2015 17:19:33

Title: [HELP] change language in runtime along with translated Gui
Post by: rmonic79 on Fri 12/06/2015 17:19:33
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?
Title: Re: [HELP] change language in runtime along with translated Gui
Post by: Snarky on Fri 12/06/2015 17:47:07
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.)
Title: Re: [HELP] change language in runtime along with translated Gui
Post by: Khris on Sun 14/06/2015 12:12:52
With the 9 verb template you can easily switch the buttons by doing this:

  // switch to German
  lang = eLangDE;
  AdjustLanguage();


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