Quantcast
Channel: Help! with 2.0 - Twine Forum
Viewing all articles
Browse latest Browse all 1844

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

$
0
0
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.

Viewing all articles
Browse latest Browse all 1844

Trending Articles