In game development, Unity is one of the most common and powerful tools. It allows game designers to focus on creating the game, rather than programming. Therefore, in game localization, Unity is also a must-learn tool.
After I downloaded the asset from UnityList, I ran it in Unity to evaluate the game and identify the strings. Unfortunately, I couldn’t get very far because the game was really hard. Nevertheless, from the few levels I was able to get through, I found on-screen instructions so I proceeded to locate those strings.
To my surprise, they were not easy to find. In the games I localized before, strings were usually located in the script files, but I looked through every one of them and found nothing. Then I noticed “Scene 1” was expanded in the navigation panel with all the levels in it, so I went into each one of them and found all the strings there under “Canvas”. Then I realized the strings in this game were not in the code, but in the UI text elements. This actually makes them a lot easier to localize because they don’t need to be internationalized. If the strings are in the code, then they have to be internationalized so that the texts can be extracted from the code to be localized. For text elements, you can localize them directly in Unity.
Right now, the most complete localization solution for Unity is I2 localization which was what I used to localize this game.
First, I imported the I2 localization package by going to Assets → Import Package → Custom Package. Then I went into “Resources” and found the “I2Language” asset where I can add languages, keys and terms. I added English and Chinese for the languages and the first key “welcome”. For the terms, I copied the English text from the text element and translated it into Chinese. I did the same with the rest of the strings. After that, I connected the text elements with the keys. I did that by going into each text element, adding a component called “I2 Localize” and then choosing the key that matched with the string from there.
To make it possible to switch between the two languages, I added a language switcher. I did that by right clicking on “Level 1” and choosing UI→ Dropdown. Then I adjusted the size and location to make it appear where I wanted it to on the UI. After that, I connected the language switcher with the languages by going to “Dropdown” and adding a component called “SetLanguage Dropdown” . Then the language switcher was automatically populated with the two languages and I was able to switch between them using the language switcher. I did go and change the display name for “Chinese” to “中文” so that Chinese players can recognize it.
And that was it! The game was localized into Simplified Chinese. Here is a demo of the localized game.
During the localization of this game, I came a cross a few challenges. The first one was locating the strings. In the Unity games I localized before, the strings were all located in the script files, but the strings in this one were located in the UI text elements, so I had a hard time finding the strings.
The second one was adding the language switcher. For the language switcher to appear in the UI, you have to add it in a specific way which is to right click on “Level 1” and choose UI→ Dropdown. If you highlight “Canvas” or anywhere else and add a dropdown, you’ll get a white bar across the UI like the picture below. It took me some time to figure this out.
If you want to localize a Unity game, refer to I2 Localization Manual. It’s very useful and has all the information you need. If you are stuck, ask for help in I2 Localization support forum. You’ll find the answers you need there.