Hi,
I know we shouldn't concatenate translations as described here (https://en.doc.boardgamearena.com/Translations) because it might alter the way the string would be translated in each language.
Yet, in my case in Harbour, i want to log all the ressources the player just got (can be 1, 2, 3 or 4) and I would like to do this:
------
My variable is dynamically set with something like (wood, stone, livestock, fish and their values depends of course of the player action) :
Note that stone and wood do have translations and I can wrap them within a clienttranslate()
And then use:
But it doesn't work because notifyAllPlayers i18n parameter expect a perfect non-concatenated clienttranslate string.
Do any of you have a good idea on how to implement this case nicely ?
I know we shouldn't concatenate
Code: Select all
clienttranslate()Yet, in my case in Harbour, i want to log all the ressources the player just got (can be 1, 2, 3 or 4) and I would like to do this:
------
My variable is dynamically set with something like (wood, stone, livestock, fish and their values depends of course of the player action) :
Code: Select all
$goods_displayed = ['1 wood', '2 stone']Note that stone and wood do have translations and I can wrap them within a clienttranslate()
And then use:
Code: Select all
self::notifyAllPlayers( "gainGoods", clienttranslate( '${player_name} gets ${goods_displayed} from ${building_name}' ), array(
'i18n' => array('goods_displayed'),
'player_id' => $player_id,
'player_name' => $player['name'],
'goods_displayed' => implode(', ', $goods_displayed),
'building_name' => $building_name,
)
) );Do any of you have a good idea on how to implement this case nicely ?