I write my game in German, because it is easier for me to translate than to be creative in a foreign language. For the most part translation works well. Now I got a little problem. I have some passages where text needs to be inserted in an other string. Something like this:
Code: Select all
$ insert = getText(1)
a "german [insert] german"
Code: Select all
# a "german [insert] german"
a "english [insert] english"
Code: Select all
python:
CONST = { 1:_("abc"), 2:_("def")}
def getText(i):
return CONST[i]
Of course there is a appropriate translation file with
Code: Select all
old "abc"
new "uvw"
old "def"
new "xyz"
"english abc english" It should be "english uvw english"
What am I doing wrong?