Code: Select all
(typTranslate unid textID [default])
Code: Select all
(typTranslate unid textID [default])
Code: Select all
<MissionType ...
<Language>
<Text id="ComeBackLater">
"I've got no " (random '("bananas" "oranges" "peppers")) " for you today, %name%, come back later"
</Text>
</Language>
</MissionType>
...
(typTranslate unid 'ComeBackLater) -> "I've got no bananas for you today, George, come back later"
There are two advantages to using typTranslate (and objTranslate):
1. It is polymorphic (in the OO sense)--that is, it allows the specific type or object to decide what text to use.
2. In the future, if all text is in <Language> tags, then it will be easier to create translations of the game.
I like it. I noticed that changes in version 1.2 and hope it will help me in future. Even if it would be translation without special signs.george moromisato wrote: 2. In the future, if all text is in <Language> tags, then it will be easier to create translations of the game.