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

**URL:** <https://forum.choiceofgames.com/t/help-with-renaming-buttons-next-restart-show-stats/16316>\
**Category:** ChoiceScript Help\
**Created:** [April 6, 2016, 8:35pm UTC](https://forum.choiceofgames.com/t/help-with-renaming-buttons-next-restart-show-stats/16316 "2016-04-06T20:35:29Z")\
**Posts on this page:** 14\
**Page:** 1

<div class="post-metadata">

**Author:** ![dreamdragonhatchling](https://sea3.discourse-cdn.com/choiceofgames/user_avatar/forum.choiceofgames.com/dreamdragonhatchling/32/3473_2.png) [@dreamdragonhatchling](https://forum.choiceofgames.com/u/dreamdragonhatchling)\
**Post date:** [April 6, 2016, 8:35pm UTC](https://forum.choiceofgames.com/t/help-with-renaming-buttons-next-restart-show-stats/16316/1 "2016-04-06T20:35:29Z")

</div>

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](mailto:support@choiceofgames.com)” wich shows under “Next” button.  
🙂

Thanks for the help!

---

<div class="post-metadata">

**Author:** ![Lordirish](https://sea3.discourse-cdn.com/choiceofgames/user_avatar/forum.choiceofgames.com/lordirish/32/238051_2.png) [@Lordirish](https://forum.choiceofgames.com/u/Lordirish)\
**Post date:** [April 6, 2016, 8:56pm UTC](https://forum.choiceofgames.com/t/help-with-renaming-buttons-next-restart-show-stats/16316/2 "2016-04-06T20:56:02Z")

</div>

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

---

<div class="post-metadata">

**Author:** ![dreamdragonhatchling](https://sea3.discourse-cdn.com/choiceofgames/user_avatar/forum.choiceofgames.com/dreamdragonhatchling/32/3473_2.png) [@dreamdragonhatchling](https://forum.choiceofgames.com/u/dreamdragonhatchling)\
**Post date:** [April 6, 2016, 9:06pm UTC](https://forum.choiceofgames.com/t/help-with-renaming-buttons-next-restart-show-stats/16316/3 "2016-04-06T21:06:13Z")

</div>

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?

---

<div class="post-metadata">

**Author:** ![RETowers](https://sea3.discourse-cdn.com/choiceofgames/user_avatar/forum.choiceofgames.com/retowers/32/21477_2.png) [@RETowers](https://forum.choiceofgames.com/u/RETowers)\
**Post date:** [April 6, 2016, 9:15pm UTC](https://forum.choiceofgames.com/t/help-with-renaming-buttons-next-restart-show-stats/16316/4 "2016-04-06T21:15:25Z")

</div>

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.

---

<div class="post-metadata">

**Author:** ![Goddess](https://sea3.discourse-cdn.com/choiceofgames/user_avatar/forum.choiceofgames.com/goddess/32/9708_2.png) [@Goddess](https://forum.choiceofgames.com/u/Goddess)\
**Post date:** [April 6, 2016, 10:06pm UTC](https://forum.choiceofgames.com/t/help-with-renaming-buttons-next-restart-show-stats/16316/5 "2016-04-06T22:06:52Z")

</div>

> [@dreamdragonhatchling](#):
>
> Next

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

---

<div class="post-metadata">

**Author:** ![CJW](https://sea3.discourse-cdn.com/choiceofgames/user_avatar/forum.choiceofgames.com/cjw/32/111787_2.png) [@CJW](https://forum.choiceofgames.com/u/CJW)\
**Post date:** [April 6, 2016, 10:58pm UTC](https://forum.choiceofgames.com/t/help-with-renaming-buttons-next-restart-show-stats/16316/6 "2016-04-06T22:58:16Z")

</div>

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.

---

<div class="post-metadata">

**Author:** ![Nahim\_Kerman](https://sea3.discourse-cdn.com/choiceofgames/user_avatar/forum.choiceofgames.com/nahim_kerman/32/62734_2.png) [@Nahim\_Kerman](https://forum.choiceofgames.com/u/Nahim_Kerman)\
**Post date:** [April 6, 2016, 11:05pm UTC](https://forum.choiceofgames.com/t/help-with-renaming-buttons-next-restart-show-stats/16316/7 "2016-04-06T23:05:19Z")

</div>

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! ^ ^

---

<div class="post-metadata">

**Author:** ![dreamdragonhatchling](https://sea3.discourse-cdn.com/choiceofgames/user_avatar/forum.choiceofgames.com/dreamdragonhatchling/32/3473_2.png) [@dreamdragonhatchling](https://forum.choiceofgames.com/u/dreamdragonhatchling)\
**Post date:** [April 7, 2016, 7:20am UTC](https://forum.choiceofgames.com/t/help-with-renaming-buttons-next-restart-show-stats/16316/8 "2016-04-07T07:20:33Z")

</div>

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

---

<div class="post-metadata">

**Author:** ![Imon](https://sea3.discourse-cdn.com/choiceofgames/user_avatar/forum.choiceofgames.com/imon/32/7592_2.png) [@Imon](https://forum.choiceofgames.com/u/Imon)\
**Post date:** [April 7, 2016, 6:53pm UTC](https://forum.choiceofgames.com/t/help-with-renaming-buttons-next-restart-show-stats/16316/9 "2016-04-07T18:53:18Z")

</div>

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

---

<div class="post-metadata">

**Author:** ![Nahim](https://sea3.discourse-cdn.com/choiceofgames/user_avatar/forum.choiceofgames.com/nahim/32/5433_2.png) [@Nahim](https://forum.choiceofgames.com/u/Nahim)\
**Post date:** [April 10, 2016, 9:16am UTC](https://forum.choiceofgames.com/t/help-with-renaming-buttons-next-restart-show-stats/16316/10 "2016-04-10T09:16:52Z")

</div>

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.

---

<div class="post-metadata">

**Author:** ![dreamdragonhatchling](https://sea3.discourse-cdn.com/choiceofgames/user_avatar/forum.choiceofgames.com/dreamdragonhatchling/32/3473_2.png) [@dreamdragonhatchling](https://forum.choiceofgames.com/u/dreamdragonhatchling)\
**Post date:** [April 12, 2016, 8:49am UTC](https://forum.choiceofgames.com/t/help-with-renaming-buttons-next-restart-show-stats/16316/11 "2016-04-12T08:49:19Z")

</div>

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

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();  
}

![](https://global.discourse-cdn.com/choiceofgames/original/2X/4/42c0b0976e0f37a3da424bc1c01827181d886f35.PNG)

This is the right file I have to modify?

---

<div class="post-metadata">

**Author:** ![Nahim\_Kerman](https://sea3.discourse-cdn.com/choiceofgames/user_avatar/forum.choiceofgames.com/nahim_kerman/32/62734_2.png) [@Nahim\_Kerman](https://forum.choiceofgames.com/u/Nahim_Kerman)\
**Post date:** [April 14, 2016, 6:19pm UTC](https://forum.choiceofgames.com/t/help-with-renaming-buttons-next-restart-show-stats/16316/12 "2016-04-14T18:19:05Z")

</div>

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…

---

<div class="post-metadata">

**Author:** ![dreamdragonhatchling](https://sea3.discourse-cdn.com/choiceofgames/user_avatar/forum.choiceofgames.com/dreamdragonhatchling/32/3473_2.png) [@dreamdragonhatchling](https://forum.choiceofgames.com/u/dreamdragonhatchling)\
**Post date:** [April 17, 2016, 2:43pm UTC](https://forum.choiceofgames.com/t/help-with-renaming-buttons-next-restart-show-stats/16316/13 "2016-04-17T14:43:42Z")

</div>

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

---

<div class="post-metadata">

**Author:** ![Nahim\_Kerman](https://sea3.discourse-cdn.com/choiceofgames/user_avatar/forum.choiceofgames.com/nahim_kerman/32/62734_2.png) [@Nahim\_Kerman](https://forum.choiceofgames.com/u/Nahim_Kerman)\
**Post date:** [April 19, 2016, 1:17am UTC](https://forum.choiceofgames.com/t/help-with-renaming-buttons-next-restart-show-stats/16316/14 "2016-04-19T01:17:47Z")

</div>

My idiom has the same problem.

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