How to Nail Game Localization in Unity
Unity has been the go-to engine for indie devs for quite a few years now. Even with the flood of new engines coming onto the market in recent years, Unity remains one of the most flexible and scalable tools for smaller teams.
Small team doesn’t mean small reach, however. If you want to localize your indie game in other languages and increase your global reach, Unity is a wonderful tool to pull this off!
There are quite a few ways to go about it - including not-so-clean ways - so let’s take a closer look at the best ways to achieve effective and efficient localization using Unity.
Pick your localization tool
Although there are many tools available on the market, we’ve narrowed things down to the three most commonly used practices.
1. The spreadsheet method
This is one of the most straightforward ways to handle localization in Unity (or any engine, for that matter), but it also requires you to have talented developers on your team.
You can use any type of spreadsheet software you like, such as Google Sheets or Microsoft Excel, as long as you can export files in CSV format.
Each column in your spreadsheet represents a different language. Your in-house game writer or designer can outline the original text in one column, and your localization team can chime in and add translated text to the appropriate column.
What’s great about spreadsheets is that you can add as many columns for added detail and context as you like, which is key for a successful localization project.
Pros: Localization teams love spreadsheets, as they’re universal tools that facilitate collaboration.
Cons: You’ll need to develop this system from scratch, which can be both a pro and a con.
2. Unity localization tool
This supports region-specific language, making it easier to create accurate localization based on varying dialects - super important for successful localization. It even allows you to localize assets. That’s right - you can actually localize beyond simple strings!
The localization tool is available in Unity version 2018.3 and later, so if you’re developing in an older version of Unity, you’ll need to update your project to access this.
Using this tool, you can create various ”locales,” which represent a language and a region in the world. You can store any information you need about your locale, including currency, calendar, and other custom data.
Unity comes preloaded with dozens of existing locales, like French, Italian, Bulgarian, Arabic, Japanese, Greek, and many more!
Your team can handle localization data by making use of Asset tables and String tables. To localize text, the String table is what you need.
Quick tip: If you’re going to use this tool, it’s better to use several smaller asset tables. This is better for memory usage and will be easier to manage.
Pros: With this tool, you can localize more than just strings, and you can work directly in Unity.
Cons: If you’re working with an outsourced localization team, you’ll need to implement a system that allows you to export your own string tables, since localization teams need to work within their own tools.
Our suggestion? Use this tool to localize your assets, but stick to spreadsheets for your strings. You can also opt to make the spreadsheet easier by choosing....
3. I2 Localization
This tool, available on the Unity Asset Store, remains the most complete localization tool available for Unity in 2019.
You can work within Google Sheets and collaborate seamlessly, but without having to hard-code the system from scratch. Since this tool has been in development for a while, it has gone through several iterations and is currently the most trusted solution on the market.
Pros: Cuts out a ton of the work for you and makes it easy to collaborate on Google Sheets.
Cons: It’s not free ($45 per seat), and it’s a third-party tool, which means it could go down at any time.
Find game translators
Now that you have your localization tool, it’s time to find the people who will actually translate your strings. We've detailed the various options available here.
Whether you go for free or paid game localization, start this step earlier rather than later. If your localization team is on-boarded early during development, you can grow the structure of the project with them and avoid workflow conflicts.
When at all possible, find your team before development starts, so you can elaborate a methodology and a framework that suit you both.
Start development with a chosen string format
Choose a format for your text strings - and then stick with it!
Your string format dictates how your strings show up in code. C# Corner has a great post on how to do this.
The string format can be chosen at the start of the development process, or when localization starts, but like most details in localization, the earlier the better.
Don’t just choose a random format because you feel like it. Pick something that aligns with the rest of the development.
It’s best to consult with your chosen localization team to ensure you pick a format that everyone is comfortable with.
Develop a string structure
To avoid errors, make sure your string structure is clear to everyone. This structure should be followed to the letter at all times.
For instance, every string needs an ID. Make sure your ID format follows a common nomenclature. For example, take a look at the two string IDs below:
Notice how the first string starts with the type of string - in this case, it’s a string that will be used for dialogue. Then, the ID specifies the name of the character that will be speaking this line of dialogue.
In the second string ID, the character name is listed first, followed by the type of string - in this case, the type is a character description that will be listed in the main menu.
Notice that the order is inverted - while the first ID lists the type first and the character name second, the second ID does the opposite. And that’s not all: notice that the string number is not formatted the same! While one ID uses three digits, the other uses only two.
If you go down this path, pretty soon you’ll be like:
This type of nomenclature shouldn’t even be attempted for a game jam!
Make sure to include context hints in your string structure as well, since this can help your localization team understand the correct use of the terms.
For the string’s language, how you will store each language depends on your chosen tool, but the best way to achieve this is to separate each language into separate files.
When writing your text, keep in mind that different languages will have varying lengths, and this should be taken into account during development as well!
Make it light!
With Unity, you can create asset bundles, which means players won’t automatically download the entire game.
For the sake of performance, you should create asset bundles regardless of whether or not you’re localizing your game. In this instance, however, we suggest creating a bundle for each language.
The game will only get downloaded in the player’s chosen language, making the game much lighter and drastically improving performance.
Unity has detailed guides on the entire AssetBundle workflow, so you’re not alone.
Wrapping it up: Streamline localization in Unity
With these tips in hand, you should be well equipped to make your localization project a resounding success using Unity. Thanks to the broad user base and detailed documentation, you’re likely to find any answers you’re looking for, even if your team is not experienced.
However, these tips are not the end-all of a great translation for your game - choosing an awesome professional localization team will go a long way to ensuring you end up with a polished result you can be proud of.