9 verbs template

Started by Carles, Tue 16/05/2023 14:38:30

Previous topic - Next topic

Carles

Hi

In a previous project I used the Tumbleweed template. I put some buttons inside the game menu to be able to change the language from there. I used this function so that all 9 verbs would update on button press:
Code: ags
Verbs.VerbGuiOptions[eVerbGuiTemplateLanguage] = eLangEN;
Now I'm modifying an old project, and it uses the 9 verbs template (but not Tumbleweed), so I can't use the previous function. I have not found a way to achieve the same. When I change the language the 9 verbs are not updated.

Thanks for the help.

Khris

Afaik you need to make your buttons run something like this:

Code: ags
  // button handler for Spanish
  lang = eLangES; // update global variable
  InitGuiLanguage();
  AdjustGUIText();

Carles

InitGuiLanguage(); I can't use it, it's from the Tumbleweed template. But instead I have done this and it already works perfectly:
Code: ags
Game.ChangeTranslation("English");
lang = eLangEN;
AdjustLanguage();
AdjustGUIText();
System.SaveConfigToFile();
Thanks for the support.

Khris

I looked at the AGS 3.4 version of the 9verb template and it looks like the function was renamed :)
Glad it works!

SMF spam blocked by CleanTalk