Translations Made Easy Using Ren’py

Translations are simple in Ren'py. Here is our Spanish translation

international audience

We observed some surprising results when we started to market Cirno’s Perfect Summer Vacation worldwide. The first thing we noticed was that we had a large number of users wanting to download our app on Android. At first, we didn’t have this on the Google Play Store, but after seeing how well it did, we created an official Android release. The other big thing we noticed was we were attracting a lot of foreign visitors to our game and artwork. It has gotten to a point on our Facebook page that we have more Spanish speakers than English ones! There is a significant demand for anime games and visual novels in South and Central America. While we are still a new indie game company, we want to do translations so that all our fans can enjoy our games!

We knew that we needed to start working on translations to accommodate our new fans. Luckily we have a diverse staff who are fluent in multiple languages. The first of our translations needed to be Spanish, so we began to work. This time, we took our existing script document and translated that. However, there is a simple way to write translations directly in the code. Here’s what you need to do:

Creating new translationS in Ren’Py
Generate translations

Click the “Generate Translations” button
Once in the Ren’Py translations menu, type in the name of the language you want to generate a translation for.
translation menu
After that, push the “Generate Translations” button, and Ren’Py will create all the files you need.
Ren'py translation file structure

Ren’Py generates a new script file for each of the text scripts in your project. So just what is inside of these files?
Translations file example

It’s a straightforward structure. Ren’Py finds every string in your scripts and creates a placeholder for you to add your translation into. It will then go through and replace that instance of the sentence with the new one you give it. Please be aware it also generates translation files for standard scripts, options, and screens. These start blank, so we just used those translation files from the example project. Since we did our first project quickly, we did not change that much from the default.
Ren'py language translations selection

The next thing you need to do is to make sure that you create an option for selecting a language. We added a selectable option box on our preferences screen. Now let’s open up Cirno’s Perfect Summer Vacation and see what we got!
Select a language

Now when we click on Spanish, we have everything translated!
Spanish visual novel menu

Updating your translationS

Wait a minute… What’s going to happen when I change the original script file!? Don’t worry friends, Ren’Py takes care of this for you! When you update your script, go through the process again to generate script files. Ren’Py will save your original translations and now will append the new scripts to the end of each file!
Ren'py's updated translation file

Now all you have to do is add in the new translations after the translation completion date! It’s that simple. I was so worried that if we changed our original script, the translations would get messed up. I am really glad that I was wrong.

Conclusion

Cirno’s Perfect Summer Vacation was created for Touhou 9 Jam and is available for free. We also uploaded our code to GitHub. You can download our source code and see for yourself how translations work in Ren’Py.

We had a great experience translating our game into Spanish. We know so much more after creating this first game. Our team is now very comfortable with the idea of releasing Amanita Asphyxia into multiple languages! We also hope that those of you who create visual novels have found this guide helpful. Please feel free to leave us a comment on Facebook or Twitter!