[Resolved] Translation problem in html tooltip
Posted: 07 October 2023, 18:42
Hello developers,
I have a small translation problem on a html tooltip
I retrieve the text from Material.inc.php via getAllDatas and then in my JS I retrieve it and inject it into my tooltip. My name is present in the tooltip but remains in English, the translation set up does not apply. I must be missing something (I simplified the code to see better):
In material.inc.php I have in the array associated with my card:
I follow the method described in the "Access" section: https://studio.boardgamearena.com/doc/G ... al.inc.php
Thanks in advance
I have a small translation problem on a html tooltip
I retrieve the text from Material.inc.php via getAllDatas and then in my JS I retrieve it and inject it into my tooltip. My name is present in the tooltip but remains in English, the translation set up does not apply. I must be missing something (I simplified the code to see better):
Code: Select all
var name = _(this.gamedatas.biomename[name]);
var html = '<div class="tooltip">'+this.format_block('jstpl_biometool',{name: name})+'</div>';
this.addTooltipHtml( 'biome_'+id, html,1000);
Code: Select all
'name' => clienttranslate("englishname"),Thanks in advance