For our final project, my teammate Dan and I got inspiration from one of the assignments, “internationalizing Bunny Hunt IV”, so we decided to find a similar topic. Then, we luckily got in touch with Nicky Case, who created the game “Coming Out Simulator 2014”, and we internationalized and localized this game.

Here’s this game in a nut-shell:

It is a story-based game with many choices for players to make; each choice leads to a different conversation and eventually all options will come to the same ending. This game tells a real story of Nicky, who came out to his parents. We hope that by internationalize this game, not only do more developers start writing codes in an internationalizable way, but also can the struggles of LGBT youths have a global reach.

I18n:

Before starting internationalizing the game, our rationale for doing it is the same as what we have learned in class about localizing the game Bunny Hunt IV. First we created “24Ways.js” file, a “lang” folder containing “french.js” file, and then replicated “index.html”, changing the name into “index_fr.html”; we referred the “24Ways.js” and “french.js” files in the “index_fr.html” file so that the localization will work in the French html game. Everything went on pretty well until we were about to wrap strings.

MQA: Here’s how we are testing whether every string is being wrapped. Dollar sign is always easier for checking than the target language itself especially since French and English are both alphabet-based languages.

We bumped into several problems in this whole process.

Wrapping Strings: We have tried to wrap the strings as we did for Bunny Hunt IV, by adding _() outside of the conversation. However, it did not work, since the game has assigned function to these lines. (see Toolkit for details.)

Find functions: Then, we went through different files to seek the function that can make it work. With the assistance of our professor, Max Troyer, we found a function [message] which works. So, instead of wrapping each sentence, we wrapped “message”. It looks like this: [_(message)].

InnerHTML: However, the function in step “2” worked very well for all messages, but did not work at all for the
“choices”. The 3 lines at the bottom of a choice view page. Then we continued to search again in the files, and we found something called “innerHTML,” so we wrapped that string instead. (see Toolkit for details.)

Unsolved problems: With the above mentioned problem-solving experience, we are almost good to totally internationalize this game. However, we still have one thing left that is beyond our ability. With the choices, sometimes they become variables in a sentence. (e.g.: “You really need to improve your +.$studying_subject+ grade.”) With such variable, we did not figure out a way to solve it. While reading this article, if you are interested in giving it a try with your CS knowledge. We’d love to know how you can solve it.

Lesson learned:

Reach out: As we have bumped into many problems during this project, one thing we both learned is to reach out to people who are able and willing to give us some help. It will not work if we just keep trying things without the right clue.

Don’t give up: When we could not find a way to wrap “choices”, we were told that maybe it was a show stopper. However, with one clue, we did not give up at that point. Instead, we looked into strings more carefully and found the “innerHTML” thing that saved this project. So, we learned to not give up until we tried every single thing that we can.

Best Practice comes from bad practice: before doing this project, the only thing we know about wrapping strings is to wrap every single sentence. That is a tedious and inefficient way of internationalization. Through working on this project, we found that we can wrap the function, which saves so much time.

Group Spirit: 

I felt lucky being with my teammate Dan, since we both have different strengths. I am pretty impatient when problems popped up, while my teammate is rather patient with me and the game. It is very important to have an understanding partner doing a project. I spent more time on the technical tryout, while Dan patiently copied strings and did most of the QA. I hope to express my gratitude towards him, and it was a great learning experience on both JavaScript, internationalization, and team work!

Toolkit for i18n and l10n of web-based game:

We have written a Toolkit to record what exactly that we did for the i18n and l10n in this game. This process can be duplicated into other web-based games. Here’s a link for you to download the toolkit. (Toolkit)