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}) ````
kazhnuz added the
0. Imported
label 2020-08-09 10:56:50 +02:00
Author
Owner

Might be solved by #41

Might be solved by #41
kazhnuz added this to the epervier 0.8.0 (beta 1) milestone 2022-08-09 08:39:33 +02:00
Sign in to join this conversation.
No description provided.