Support modifiable part in translation system #6

Open
opened 2020-08-09 10:56:40 +02:00 by kazhnuz · 1 comment
Owner

The translation system should be able to translate strings like "This cost $1 gold" with $1 being replaced by an arbitrary value.

The problem here is that we should also support easily "composite" string, like "you are petting a $1" with $1 refering to ANOTHER string that could be translated... (but maybe we could just handle some kind of workflow like

local _specie_translated = core.lang:translate("animals", animal.specie)
core.lang:translate("battle", "animal_pet", {_specie_translated})
The translation system should be able to translate strings like "This cost $1 gold" with $1 being replaced by an arbitrary value. The problem here is that we should also support easily "composite" string, like "you are petting a $1" with $1 refering to ANOTHER string that could be translated... (but maybe we could just handle some kind of workflow like ````lua local _specie_translated = core.lang:translate("animals", animal.specie) core.lang:translate("battle", "animal_pet", {_specie_translated}) ````
Author
Owner

Might be solved by #41

Might be solved by #41
Sign in to join this conversation.
No description provided.