Page 1 of 1

Translation Problem between material.inc.php and #game#.js

Posted: 06 October 2024, 21:21
by BaronBeule
In material.inc.php I have an array of cards:

"desc" => clienttranslate("6 Points and 2 Special Points").

If I access this array in the js file with this.gamedatas.cards and render the "desc" in a div, the translation does not work?!

Second question: How can I test translations in a local game on studio server? Can I switch to another language to test my translations?

Thanks in advance

Re: Translation Problem between material.inc.php and #game#.js

Posted: 06 October 2024, 21:29
by thoun
clienttranslate marks the text as translatable. Using it in the front with _(desc) should work, but desc alone isn't translated.

Re: Translation Problem between material.inc.php and #game#.js

Posted: 07 October 2024, 05:55
by nicotacotac
BaronBeule wrote: 06 October 2024, 21:21 Second question: How can I test translations in a local game on studio server? Can I switch to another language to test my translations?
On game manager, you can click on "display dummy translation ", it will add << and >> to every translatable strings.

Re: Translation Problem between material.inc.php and #game#.js

Posted: 07 October 2024, 20:58
by BaronBeule
thoun wrote: 06 October 2024, 21:29 clienttranslate marks the text as translatable. Using it in the front with _(desc) should work, but desc alone isn't translated.
thanks for your quick reply, but is it not translated twice? First time in the material.inc.php and the second time in the js-file (desc) ? What ever, i give it a try :-)