I know a lot of translators that dedicate themselves to mostly translation complain about the automatic translations Roblox enforced. And I don’t blame them – machine translations usually suck unless they are generic sentences, sometimes even those can go wrong. But I guess it mostly depends on language. I even have Roblox set to English since the translations of games are not good since they don’t actually have someone translating the games for them.
So I thought “what if I did a pure Lua(u) solution”. All the strings that are displayed to the client would be in ModuleScripts inside ReplicatedStorage, and the programmer would get the locale of the player to determine which ModuleScript to load in.
Ideally for UX you should default to the player’s Roblox locale, but a setting to let them change it dynamically in-game without needing to exit the game and change their account settings is great.
Disadvantages to this is of course translators don’t have a fancy portal to translate strings in, and if most games just hardcode the strings to show in the codes that display them, then it is probably time to do some refactoring, but this is a good thing anyway. Better to have content.coins_display:format(player_coins)
a million times only to later on not be satisfied with the text and change it only once from a module from "Coins: %d"
to "%d Coins"
versus ctrl + f’ing everywhere and ctrl + h’ing. I’ve forked Discourse plugins to translate them and just edit raw yml files of all the strings the plugins show.
I also think the translator portal lets you translate the game title, so if that is the case you’ll probably still want the portal for that. But I don’t regularly translate games on Roblox, so I don’t know. I might just keep using this method.
The demo is open-source:
Unfortunately my language arsenal only consists of Spanish (native speaker) and English, so I only added Spanish. You can click on the cog to toggle between the two. If you don’t understand Spanish that is fine – the game is just meant to showcase the translations without using the portal.
What do you think? Do you have any feedback on this structure? Do any other games actually do this already?