• Register
Post news RSS Devlog #104: localisation support

I wasn't sure whether it's "localisation" or "localization", but the Internet says that both are correct...?

Posted by on

Hello again! With one big technical task behind me (and I'm talking about the controller support), the time has come to deal with the other one, being the ability to handle multiple languages in the game.

There are two major areas that need to be handled here. The first is moving all of the localisable text from the game to an external source.

I've decided to put these texts in a plain .txt file, one for each language. Using json/xml format did not seem like a good idea, as there would be problems with escaping some of the characters to make sure they don't mess up the syntax.

Here's a screenshot from the English translations file:



The lines hold information about the name of the translation key and then its translation. If there are multi-line texts, the line breaks are represented as "\n".

I've created few tool windows in Unity to allow me to add/edit translation keys easily (I took inspiration from this YT video) and made sure that the order of the translation keys is always the same as the one in the English translations file (this is being enforced via the Unity tools I've created).

Based on the selected game language, the text in the game change dynamically. Right now I have some debug in-game shortcuts set up that allow me to switch the language on the fly.



Now, the second thing is about making the localisation process as easy as possible. I am creating the English and Polish versions myself, but the other ones will have be handled by someone else. Now, to make sure that a person doing the localisation is able to do a good job, they need a) a more convenient way to edit stuff than an ugly .txt file b) some more insight/hints for specific translation keys.

The first thing I've added was metadata for every translation key. You know, information about the context of the text, whether it should be kept short or not, stuff like that. I'm basically storing this information as an extra "language", in its own .txt file.

Then, I've created a stand-alone tool that generates an Excel file with all the translations (well, you can pick which ones should be handled) and creates a separate tab in the spreadsheet for every key - along with the English translation and metadata. This form is more readable, one can easily sort/filter/do other Excel-ish stuff on it, and this is the form that the translations will be sent to the localisation people.



Last but not least, there's a tool to import the data from the Excel sheet back to the .txt translation files. Note that this needs to be able to merge the stuff together, as there might be some new translation keys present in the game as I'm adding more stuff. What is more, the localisation team can use that tool to instantly upload the new translations to a game build, to see how they look in action.

Here are some auto-generated Excel files along with shortcuts to the import/export tools:



So, there you have it. The first version of the import/export Excel handling is already implemented, and I'm spending most of my development time on moving all the texts to the translation .txt files. So far I've created more than 200 translation keys, but I still have lots of stuff to move! There will surely be some issues/challenges that I'll need to face here - I'll make sure to write about them in two weeks.

Take care, and have a great weekend!

Post a comment
Sign in or join with:

Only registered members can share their thoughts. So come on! Join the community today (totally free - or sign in with your social account on the right) and join in the conversation.