Polyglot – Localization for the masses #gamedev

A friend of mine, Kevin Harris, recently told me about a project referred to as “Polyglot”, while we were discussing localizing games. I’ll explain it to you as he explained it to me:

“It’s a big table full of translated commonly used terms for game devs.”

I was immediately intrigued, and wanted to know where I could get a copy of this asset. I was shocked again when he told me it was free. I went home and researched (Googled) the project. What I found was nothing short of wonderful. See for yourselves here: POLYGLOT — It was as advertised, a large spreadsheet of generic game terms translated into a bunch of languages. The front sheet of the site gives you all the details on it’s founders, how to contribute, best practices, and licensing (CC0).

I was also impressed to find an already built plugin for Unity (my preferred game engine). Here is where I personally hit some snags. I’ll go through them with you now in case you find yourself in a similar situation.

First was that I needed to find a font that supported multiple language characters. Not all internet downloaded fonts, or even system pre-installed fonts, support languages like hebrew, bulgarian, or russian. I found this font which came with support for 25 of the Polyglot language characters. It also fits into the design aesthetic of my game, and is free to use for commercial purposes. So, now I had a decent font.

Awesome 100% free font that supports lots of languages.
Awesome 100% free font that supports lots of languages.
The next issue I had was the plugin. Don’t get me wrong, it’s a wonderful piece of code. It’s well written to execute, but not so much to read. The package did come with a sample scene that you can pick apart to figure out how everything works. I’ll give you a quick tour.
Every scene must have a “LocalizationManager” included. This item is the brain of the operation and handles language changes and get’s called to find the translations.

The brains of this outfit
The brains of this outfit

Then for every Text UI item, TextMesh, or GUIText that you have you attach a localizing script. You give that script the key from the table that you want to use such as MENU_LABEL_PLAY. This will then convert the word “Play” into whatever language the player selects. In the package they make use of a dropdown menu to let the player pick a language, but since I don’t want that in my game I modified it a bit.

Attach one of these to the text you want a translation for.
Attach one of these to the text you want a translation for.

Unity’s Application.systemLanguage method works natively with iOS to determine the preferred language of the device. Using that method I grab it from the users device and then tell the Polyglot plugin which language to automagically switch to. Here it is on the splash screen being tested in Russian on my iPhone.

It says "PLAY" in Russian, i think...
It says “PLAY” in Russian, i think…

It took roughly 4 hours and some minor tweaks and I had localized my game in 25 languages. The Unity plugin also downloads the most recent version of the Polyglot csv file when you start the game. This means that as the table grows, and corrections are made, your game will adapt. Adaptive Open Source Localization…genius. If you’re not connected to the net, it simply uses the last updated csv.

Polyglot is an awesome tool for developers with a minimal or no budget for localization. What are the drawbacks though? For one, you’re at the mercy of the internet to provide translations that won’t insult someones mother. There is also the lack of customizable terms, but for my purposes it works perfectly. The overall scores hit as follows:
Polyglot 10/10, would recommend, I’m recommending it right now.
Polyglot Unity Asset Package 9/10, had to add my own auto detection. Still awesome!
Kevin Harris 12/10, would talk to again.

About the author


View all posts

Leave a Reply

Your email address will not be published. Required fields are marked *