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

Game development with Board Game Arena Studio
Post Reply
BaronBeule
Posts: 5
Joined: 09 January 2021, 20:13

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

Post 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
User avatar
thoun
Posts: 1618
Joined: 10 December 2020, 22:25

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

Post by thoun »

clienttranslate marks the text as translatable. Using it in the front with _(desc) should work, but desc alone isn't translated.
User avatar
nicotacotac
Posts: 73
Joined: 20 March 2020, 13:42

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

Post 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.
BaronBeule
Posts: 5
Joined: 09 January 2021, 20:13

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

Post 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 :-)
Post Reply

Return to “Developers”