Friday Facts #436 - Lost in Translation

Posted by Hrusa on 2024-11-08

Hello,
We are still diligently working away at the Space Age bug reports.


Trouble with languages

While fixing an IME keyboard (Asian language) bug introduced by the 2.0 update, I got curious and started exploring localisation for various languages. Even though my native language is Czech, all of our development on the game happens in English, so I essentially never run the game in this mode.

As I was twiddling about in the Czech crafting menu, it quickly came to light that the user experience wasn't as smooth as I would expect.

Any capital non-English letter would cause trouble. Looking up "čerpadlo" (pump) yields "Ropné čerpadlo" (Pump jack) and "Pobřežní čerpadlo" (Offshore pump), but not "Čerpadlo" (Pump) due to the capital Č not being matched to lower case č. Players have already developed a habit of typing stuff like "erpadlo"(ump) in order to avoid the troublesome letters altogether.

Non-English search finally supported!

Obviously, this has been terrible user experience for years and I took it upon myself to address it as quickly as possible. The root of the issue was that until now we searched by casting each "code letter" to lower case via a standard function. However, internally (in the Unicode representation) any letter with accents or outside the latin alphabet takes up multiple "code letters" and therefore wasn't recognized or converted at all.

Furthermore, Unicode letters are quite a mess, since the table has grown gradually over the years. Many letters are scattered all over. Out-of-the-box solutions are usually bloated to accommodate edge cases for many scripts and languages we can't even render in Factorio (Hieroglyphs, Sumerian Cuneiform, Emoji...). My solution was to write my own custom mapping focusing on languages we officially support.

And since I was already at it with a custom solution, it allowed me to further tailor search hits to how people type in everyday life:

  • Accented letters are equivalent to non-accented ones. "zelezny plat"(iron plate) = "železný plát"(iron plate) = "ŽELEZNÝ PLÁT"(IRON PLATE)
  • The two Japanese kana alphabets are now equvalent in search. 「べると」(belt) =「ベルト」(BELT).
  • The two lower case sigmas in Greek both match the capital sigma. Σ = σ = ς

The new localised search improvements will be released with the upcoming 2.0.16 experimental release.

Here is where I would like to hear from you. If there is some other useful search feature that you find missing from a supported language, please let me know on the forums or as a response to this article. I have tried to consult these features with our translators ahead of time, but I can only reach so many native speakers myself. It is also possible that some visually similar accents got omitted by accident.

Mod portal search

Besides the in-game search, our mod portal search has also been improved this week. In the past it wouldn't always yield proper matches with asian languages. We have updated our search provider to a newer version and now it should be working better.


Contribute to Translations

With 2.0 and Space Age, we have added a lot of new items, descriptions, tips and such to the game. Each of these needs translating into foreign languages, and we rely on our community to contribute these for us.

If you are interested in getting involved in the localisation of the game, please join the effort over on our Crowdin Project. To those already helping out, thank you very much for all your help. We know there are quite a few Crowdin issues and base game locale problems being reported, and we hope to address all of them in time.


As always, type your thoughts in the usual places.