Self-hosted non-english game

Hi all! :wave:
I’m writing a non-english game, and I would like to host it on my website, but I need help with two things.

  1. How can I translate the whole UI, including buttons, dialogs, and similar things? I tried to do it in the ui.js script file, but the changed file has a problem, it didn’t output my story in absolute.

  2. What should I do once finished the story writing and UI translation? How to export the story to a website usable format?

Thanks in advance,
Dani :hugs:

1 Like

Can’t help you with 1, but with 2. you can compile the story (there’s an option to do this in the package) which can let you run the game if hosted on a website. The only issue with this, is that compiling will break any images in your game. There is a way around this using CSIDE though, so if you need to do that do a quick search of the forums (or ask if you can’t find it.)

1 Like

In the choice script tipps and informations you find the instruction to change the button text, take a look at this

1 Like


The images aren’t a problem, cause I’m blind and I don’t need them in my first stories. :slight_smile:

If you are talking about this…

Labeled buttons: By default, *finish buttons say “Next Chapter” and *page_break buttons say “Next”. You can make the button say something else, instead:

  *page_break On with the show!
  *finish The show is over!

We recommend no more than five words on button titles; more than that looks really weird on the screen, particularly on mobile screens.

Sorry, but that isn’t the answer to my question. :frowning_woman: I already read it.

I am looking for the way to translate the whole UI, including the buttons “Show stats”, “Preferences”, etc. And of course the settings and dialogs.

I’ m sorry, when I am home from Work, I will take a closer look into the code so I may help you better

This isn’t something you can do with ChoiceScript, it’s something you would have to do to ChoiceScript, which is to say the ChoiceScript javascript.js files (which are available on github). You’d have to dig through those and find the pieces of javascript you need to alter from English to whatever language you’re translating into.

1 Like

The Thing you are looking for seems to be found in the user interface file, the ui.js file. I think the name in the brackets might simply be replaced. I´ll run tests at the weekend and tell you more about it.

1 Like

Out of curiosity, is there a method of writing that makes it easier for people with blindness to listen to it?

1 Like

Hi all, thanks for your answers. Excuse me, I’m a ChoiceScript newbie. :slight_smile:
It seems like both questions are solved.

  1. The problem with my changed ui.js was very simple, I forgot to close an if statement and it crashed a function, and the whole script file. :expressionless:
  2. I will upload the whole web folder from the source, and this will make the game playable from my website. How smart I am, right? :stuck_out_tongue: :slight_smile:

Now, if I don't ask for too much, can anybody help me to combine *script with variables created with *create? Here is an example.
*create mc_years 22
*script var years = ${mc_years}
*script var txt_years = spell(years)

So, if I define a variable in startup.txt, how can I pass it through a function defined in my JS file, and return the result to the game?
Should this be posted in a separated topic?

Hahah, you’ve apparently read my bio. :smiley:
Well, it’s OK as is. We read it with a screen-reader, so it announces the text, the buttons for the stats, preferences, etc. and of course the choices. I’ve just played the first part of Choice of the Dragon on my iPhone and had no problems. It works fine for all platforms.
I wouldn’t go in details about what a screen-reader is (at least not in this post), but the conclusion is: yes, this format of the games is fully playable by the blind or visually impaired users. Well, sometimes there are issues with non-properly labeled images, but the same occures on the whole web.


Hi DJ! I would like to host a game on my own server, and in French. If I understand, I have to load and modify ChoiceScript? In what langage it is? Javascipt? Node.js?

Thanks for your help, I am a pure newbie.