Howdy, Stranger!

It looks like you're new here. If you want to get involved, click one of these buttons!

SugarCube 2.18 Trouble with localization. Cannot translate "Saves".

Hello. I want to give player possibility to switch language (from EN to RU and from RU to EN) in game. And I need it for fast checking of translation.
<<link "RU" "Debug">><<script>>
l10nStrings.savesTitle = "Сохранения";
l10nStrings.restartTitle = "Рестарт";
...
<</script>> <<set $lang = "RU">> <</link>>
<<link "EN" "Debug">><<script>>
l10nStrings.savesTitle = "Saves";
l10nStrings.restartTitle = "Restart";
...
<</script>> <<set $lang = "EN">> <</link>>
So I changed l10nStrings.saveTitle and other vars but don't see changes in game. When I check this thing by this way:
<<link "Test" "Debug">><<script>>
alert(l10nStrings.savesTitle);
l10nStrings.savesTitle = "Bla bla";
alert(l10nStrings.savesTitle);
<</script>><</link>><br>
I see that savesTitle changed to "Bla bla". But in UI bar I see "Saves" (it doesn't change if I toggle between passages).
Do I need to reload UI bar (how?) or something like this?
Thank you.

Comments

Sign In or Register to comment.