Help with renaming buttons "Next", "Restart", "Show stats"

Hello, I’m for my school project making a game with choicescript but I have to make it in Latvian.

How can I rename buttons “Next”, “Restart”, “Show stats” also change the word “by” when specifying the author.

Also, I will need to take off this line “Love it? Hate it? Write us at support@choiceofgames.com” wich shows under “Next” button.
:slight_smile:

Thanks for the help!

I am a bit rusty but belive you can do this in the index file, of course it may take another step. As far as programing it has to be in English but you can make the text the player reads in the language required

Yes, I know, that the code has to be in English. I only need to translate the text my teacher will see XD , but I have no idea how to do it.

Index file?

First download a new copy of CS (It sounds like you have an old one).

Second: When go into the web folder, the mygame folder, then right click the index file and open that with a text editor (notepad). You should be able to see the names of the buttons and edit them from there IIRC.

When ever you do a page break you can put whatever word you want.
*page_break Text…

IIRC the buttons are now updated via a function in ui.js (printFooter() maybe? I know it’s a header shrug). Changing them in index.html won’t be enough.

3 Likes

Inside ui.js press :Control+F: and go to:

function printFooter() { // var footer = document.getElementById('footer'); // We could put anything we want in the footer here, but perhaps we should avoid it. var statsButton = document.getElementById("statsButton"); if (statsButton) { if (window.stats.sceneName == "choicescript_stats") { statsButton.innerHTML = "Return to the Game"; } else { statsButton.innerHTML = "Show Stats"; } } setTimeout(function() {callIos("curl");}, 0); }

Now replace “Show Status” for anithing you want in any language:

Example:

function printFooter() { // var footer = document.getElementById('footer'); // We could put anything we want in the footer here, but perhaps we should avoid it. var statsButton = document.getElementById("statsButton"); if (statsButton) { if (window.stats.sceneName == "choicescript_stats") { statsButton.innerHTML = "Voltar ao jogo"; } else { statsButton.innerHTML = "Mostrar Status"; } } setTimeout(function() {callIos("curl");}, 0); }

That’s Easy! ^ ^

2 Likes

Thanks to you all, I’ll try it out when I’m back home! ^^

I changed “Restart” in the index file and it worked. But show stats doesn’t change.

try change it on the file “ui.js”.

ui stand for “user interface” i guess there is the place where the game interface is coded.

I downloaded the newest, but I can only find this, and when i change the names game breaks. :frowning:

function printFooter() {
// var footer = document.getElementById(‘footer’);
// We could put anything we want in the footer here, but perhaps we should avoid it.
var statsButton = document.getElementById(“statsButton”);
if (statsButton) {
if (window.stats.scene.secondaryMode == “stats”) {
statsButton.innerHTML = “Return to the Game”;
} else {
statsButton.innerHTML = “Show Stats”;
if (window.isAndroidApp && window.statsMode.get()) {
showStats();
}
}
}
curl();
}

Changing to:

function printFooter() {
// var footer = document.getElementById(‘footer’);
// We could put anything we want in the footer here, but perhaps we should avoid it.
var statsButton = document.getElementById(“statsButton”);
if (statsButton) {
if (window.stats.scene.secondaryMode == “stats”) {
statsButton.innerHTML = “Atgriesties Spēlē”;
} else {
statsButton.innerHTML = “Rādīt papildus lietas”;
if (window.isAndroidApp && window.statsMode.get()) {
showStats();
}
}
}
curl();
}

This is the right file I have to modify?

Is it.

My guess is that the characters you were using: “ē” “ā” and “ī”. Are not supported by the Unicode…

So… the browser does not recognize them…

but i can be wrong…

Yeah, I figured that out and renamed without “ē” “ā”

My idiom has the same problem.

Only works if coded “UTF-8” in the “meta”;…