How to Implement Chinese Language Support (Simplified & Traditional) in a ChoiceScript Game?

Hello everyone,

I’m currently working on a new ChoiceScript project and I would like to make the game accessible to a Chinese-speaking audience, which is a very large potential player base.

I’m seeking advice and best practices on how to effectively implement Chinese language support (both Simplified Chinese and Traditional Chinese) into a ChoiceScript game.

Specifically, I have a few questions for those who might have tackled multi-language support before or for anyone familiar with the ChoiceScript system’s capabilities:

  • Best Method for Storing Translations: What is the recommended way to handle the massive amount of translated text? Should I use a separate .txt file for each chapter’s Chinese translation, or is there a more efficient system within ChoiceScript or through external tools?

  • Switching Languages In-Game: What is the best way to allow players to switch between English and Chinese mid-game? Does this require complex if statements throughout the entire text, or are there cleaner methods (perhaps using gosub or another command based on a set variable like language?)

  • Font/Encoding Issues: Are there any known issues with displaying Chinese characters (Simplified and Traditional) within the standard ChoiceScript interface or the default COG/HG app framework? Are there specific font recommendations to ensure compatibility?

  • Community Tools/Resources: Are there any existing community-made tools, templates, or guides specifically for creating multilingual ChoiceScript games?

Any advice, code examples, or links to relevant forum discussions would be immensely appreciated. Making the game multilingual is a huge priority for me, and I want to ensure the implementation is as smooth as possible for both development and the player experience.

Thank you in advance for your help

3 Likes

It has been asked before.

The short version, choicescript and CoG does not support the writing of games in other languages.

Even if you wrote all the content in another language, the “Next” button at choice sections and other options would still be in English. If you are tech savvy enough to modify the innards of the choicescript engine, it could possibly be changed, but it would be unsupported, and you would be better off using a different game engine like ren’py with localization support.

If you plan to submit the game to HG:

That is out. CoG/HG will only accept submissions in English, and to the best of my knowledge, they have not changed this position or gave any indication that they would do so.

If you plan to make a hobby game:

You’ll still have the issues I mentioned earlier. Not to mention, getting support on this forum will be difficult as not everyone here may be able to read said language.

4 Likes

100% won’t be accepted as a HG. As a hobby project though, you can fish about in the source code to manually change the buttons. Do a search, it’s probably up on the wiki if you’re lucky.

If you want Chinese and English, you’re probably going to have to have different files for them, or at least different sections of the text file. I would strongly recommend against having at will language changes as you’d need to *if every single sentence otherwise. Just have it at the start of the game.

Uncertain about the text compatibility. If it doesn’t like something, you’ll likely get little boxes with question marks in them. It’s better than it used to be, so you might get away with it.

4 Likes

I appreciate the passion for making the game multilingual…but sadly, as others have noted, nothing about CoG/HG or ChoiceScript is set up to make that easy. The company’s one experiment in making a game available in a language other than English was a total commercial failure, and that dropped everything to do with translation to the bottom of the corporate priorty list.

Incorporating a machine translation tool into CoG’s app, so that the English screen output could be automatically translated into other languages, would be an interesting possibility – but it would probably involve costly licensing of someone else’s translation software, an investment I doubt the company is about to prioritize any time soon.

Without that, trying to make a game available in multiple languages will be a resource-intensive project that (I’m afraid) next to nothing about the current CS ecosystem will facilitate.

4 Likes

Sadly

QAQ

1 Like

As others have mentioned, CoG had a previous failed experience trying to release a game in Spanish. This caused them to abandon any future project for an international audience, and they’ve been open about it.

But that’s for the company’s own games. I don’t remember ever seeing a public position on hosted games. That said, to be honest, I think they wouldn’t publish a game in a different language. You should check directly with them. Although I’ve never seen them take a position on hypotheticals, so you’d need to have the game ready or near ready to start negotiations with them, which means taking a leap of faith.

As for a hobby project, that wouldn’t be an issue at all, as long as you don’t make money out of it.


As for the technical implementation, it’s feasible, but not straightforward. All (or most of) player-facing UI text is hard-code in the UI file of the engine. You’d have to tweak it there to pick strings dynamically. Best practice dictates you should have a separate file in a data storing format with all possible strings in all possible languages, maybe json or yaml. That’s for UI text only, I mean. For the game text, see below.

As for character encoding, they use UTF-8 which is the most accepted encoding out there. There shouldn’t be any issues with that.

Supporting a single language choice at the beginning of the game would make your life a lot easier. Have different game files for English and Chinese, they would behave just like different branches in your story.

If you want to support on-the-fly switching between languages, you’d need to include labels for every implicit “passage”. A passage is any piece of text displayed to the player. An example of implicit passage is the text body of a choice option or the text after a page break. Then you’d need to track your current file and passage location, so when players change config you’d redirect them to the equivalent passage in either the English or Chinese version of the game. You’d also need to always use global variables and not local variables, and never use the tunneling/storylet technique (using subroutines to branch out the story and coming back to a previous point and continuing the story from there), because once you redirect the engine will not know it’s in the middle of a subroutine anymore. In other words, subroutines would have to be used exclusively for calculations only and never for printing text to players.

As you can see, it’s feasible from a technical point, but it’s a lot of work. If you’re tech-savvy enough, you can write a post-processor to parse the game files and add labels and set commands to track the labels instead of doing it manually.

1 Like

Couldn’t they do a license and post the game on Itchio or something if they really wanted to sell in both English and Chinese? At least one author from here went the license route when they weren’t able to publish through Hosted Games. For clarification, that’s when you pay CoG for the right to use their code outside their library. I don’t know much about how that works though. And I will say, it can be a hard curve to find a loyal audience on Itch but that’s true to some extent anywhere.

If this is a priority for you I highly recommend looking into Twine rather than ChoiceScript! It’s not as easy out of the box to use but it gives you far more control, and it’s open source so you can monetize.

1 Like

Being written in English is “at this time” a requirement. I feel like there was a thread where they said more about this, but I can’t find it.

If CoG were willing, yep. But that route has always felt to me like it’s ditching the most valuable thing CoG/HG actually provides – the brand and the existing audience they’ve built. Take that away, and you’ve got a programming language for text CYOA games, which is (as Dan often points out) the second thing programmers figure out how to do after HELLO WORLD.

As a nonprogrammer myself, I totally get why you’d want to pay for that service…but not why you’d choose to do that while forgoing the app store integration services that come with a HG contract (which takes programming skill and time) or the existing audience for the Hosted Games brand.

3 Likes

Well that’s a different issue, whether they’d consider it worth it or not. Personally, I might, if I were in their place, since I strongly prefer coding in CS. I simply want them to be aware that if their heart is set on Choicescript for whatever reason, they may not have to forgo the plan of Chinese language support. Who knows, perhaps CoG would let them publish the English game through Hosted and the Chinese translation on Itch or wherever with a license. It doesn’t seem overwhelmingly likely, but it’s a question one could ask.

1 Like

Oh, I meant in the sense that they wouldn’t publish a game if it also had another language, like English and Chinese.

1 Like

It wasn’t exactly failed. They chose choice of dragon as it’s short, but I think perhaps understandibly being an older short, free game, it didn’t make enough money to cover the translation as professional translation services are expensive. And that’s the big issue. Games are getting super long. I hate to think what paying to have a game hundreds of thousands of words would cost.

From a company standpoint, they can’t afford to have random people translating the games, because if they can’t read the language, they can’t know how well it was done or exactly what it says. So no, I very much doubt they’d allow anything even with a translation/english published on HG.

6 Likes

I feel like this plays a big part of it. They don’t want Hosted Games to be an anything-goes vanity press; they want/need to be able to vet these games on their platform to some degree, and they can’t really do that if the game’s in a language they can’t read.

So, even if the author is willing to do the translation, or write an only non-English version, Choice of Games staff can’t do any QC on it.

Plus, “just translate the game” sounds a lot easier than it actually would be. Other languages may have totally different grammatical structures that may not make sense with the way an English game is written. Like:

There’s a tiger snarling in front of you! You decide to…

  • …stand and fight!
  • …run away!
  • …pat it on the head!
  • …sing it a lullaby!

Other languages may not follow that kind of syntax, making these choices unintelligible unless a human interpreter can get creative with reorganizing the sentence structure. And I won’t even get into the pronoun issues. Just saying it’s a thornier prospect than just hitting a translate button.

4 Likes

Well, it didn’t pay itself, so it failed. :man_shrugging:t2: It’s not a judgement on the quality of the game.

In the end of the day, it’s the company’s choice, we can only conjecture. Putting myself in their shoes, I wouldn’t be willing to commit to anything without a real, concrete need. I believe there’s a chance they could be convinced, but only if you already have a game ready for publication, and no one is willing to spend months working on something that only has a chance of getting accepted.

One way they could circumvent not knowing the target language, for example, is demanding a public beta test of the translated version, not unlike what a normal HG game goes through, and rely on the community to pick up anything weird. I don’t think they read through every word of submitted hosted games, anyway. So it wouldn’t be that different.

But like I said, I don’t think they would ever make it an official company procedure without the need. And on the other hand, authors are not willing to take the risk. :man_shrugging:t2: So it’s a standoff.

I don’t think anyone was seriously considering that, though. A translated version would have to be done like Choice of the Dragon or that one fan translation of Choice of Romance.


On that note, I really think there’s an untapped market out there and that Choice of the Dragon was not the best choice to kick-start an international branch, despite its initial success. As @Jacic mentioned, choice games have changed a lot since CotD was released, not to mention different tastes of different markets.

2 Likes

I’m fairly sure I remember this being posted as the reason, but I could be wrong.

2 Likes

Ditto, both on the “think I remember” and “can’t now find the actual post where I remember a CoG rep saying this.” :slight_smile:

2 Likes

Well, if you guys can find it… As for me, I’m 100% certain I’ve never seen an official position on it. I think it has become a sort of thing everyone just takes as truth, like “they’ll never publish a game with script command in it.” I’ve never seen a position from them and never seen any author saying they tried but had to remove it, but every time the topic comes up someone will mention the invisible rule, so it self-perpetuates.

3 Likes

Might have been referring to this thread?

Jason did make a few posts about the matter in that thread.

I appreciate the offer, but the errors in English in your post demonstrate why we’d never accept. Moreover, you describe it as a hobby, but this isn’t a hobby. This is our business. It’s not professional to have a hobbyist translation. It would make us look bad.

Moreover, I would argue that you have no conception of how big a job it would be to translate 300,000 words. Seven years ago, when this company was just a hobby, someone offered to translate Dragon for free. It’s 25,000 words. He got through one scene and said, wow, I don’t have time for this; it’s much harder than I thought. I hazard that you would have the same reaction.

I’m not sure what post you had in mind. Just offering this if it was.

Anyway, on another note, someone did contact me about translating my latest visual novel into Spanish. I can let you know how that goes.

4 Likes

Donor had to remove scripts before it was published :slight_smile: . They had some mini games using it. (I have no idea why my brain is remembering these weird snippets of information, but can’t remember stuff that I actually need from the week before lol)

5 Likes

Happens to us all. :joy:


Well that is the first I hear about it, but good to know.

2 Likes