[Solved]Trouble with translating variables
Posted: Thu Aug 09, 2018 9:50 pm
Hello there! I'm trying to translate my game in second language, where I face a bunch of problems >. <
Like, I'm using a lot of variables in screens, such as characters' data or locations' names:
And define those variables, then translate them:
Problems is I found that doesn't work.
Variables cannot be translated when we use it either in scripts or in screens.
So is there any solution can be used to translate variables?
Thank you for taking time to read my stupid problems QAQ
Like, I'm using a lot of variables in screens, such as characters' data or locations' names:
Code: Select all
fixed:
area(1275, 250, 320,870)
vbox:
xalign 1
text _("Sex: ")
text _("Age: ") ypos 10
text _("Occupation: ") ypos 20
text ""
fixed:
area(1500, 250, 320,870)
vbox:
xalign 0
text "[Mc.sex]"
text "[Mc.age]" ypos 10
text "[Mc.job]" ypos 20Code: Select all
screen Map(spot):
zorder 300
fixed:
style_group "page"
area (547,64,1150,943)
if spot == 1:
text [locate.L1] xpos 120 ypos 380
if spot == 2:
text [locate.L2] xpos 366 ypos 226And define those variables, then translate them:
Code: Select all
init python in locate:
L1=_("House A")
L2=_("House B")
# Location.rpy:450
old "House A"
new "房屋 A"
# Location.rpy:452
old "House B"
new "房屋 B"
Variables cannot be translated when we use it either in scripts or in screens.
So is there any solution can be used to translate variables?
Thank you for taking time to read my stupid problems QAQ