Page 1 of 1

Question about translation

Posted: 27 September 2020, 14:37
by Volker78
For notifications, is it possible to translate args in arrays recursively? For example:

Code: Select all

		$this->notifyAllPlayers('xxx', clienttranslate('You have the words ${words}'), [
			'i18n' => ['words'],
			'words' => [
				[
					clienttranslate('a'),
					clienttranslate('b'),
				], 
				[
					clienttranslate('c'),
					clienttranslate('d'),
					clienttranslate('e'),
				],
			],
		]);

Re: Question about translation

Posted: 27 September 2020, 14:52
by Tisaac
What is it supposed to write ? How do you expect an array to be converted to a string in the notif message ?

Re: Question about translation

Posted: 27 September 2020, 19:25
by Een
Yes, it's possible, there is a quick example about this at the end of http://en.doc.boardgamearena.com/Main_g ... fy_players