Unity How can I, as a Unity Developer, make my game easier to translate?

Oir

Active Member
Nov 5, 2018
540
750
Aside from obvious things like avoiding text in images, what can I do as a unity developer to make my game easier to translate into other languages? I've never actually translated a Unity game myself so I have no idea what difficulties make translating some unity games much more difficult or easy compared to others.

I'd appreciate any insights from translators as to how your lives can be made easier in this regard!

Thank you for your time!
 

Surgy

Member
Modder
Apr 23, 2018
342
1,336
  • Don't bake any text into code and always resolve it through a translation function that gets it from a translation file or its cache (unless it's a text script that's better localized as a whole).
  • Don't store strings in MonoBehaviours, use .csv files for that instead (with a rarely used visible character as the separator);
  • There should be some context like character name and event somewhere near their lines;
  • Common stuff should be replaced with macro strings like %gold% or \\G instead;
  • The lines of the translation file should contain both the original text and the translation;
  • Images and files should be named something like <filename>_<language code>.ext and loaded accordingly to a chosen locale;
  • Translatable images and text should be in their own asset files (like a 2Gb merged asset file with localized images is a bad idea);
  • The game should manually configure it's thread's CultureInfo to not depend on the user's unknown default locale;
  • All translatable assets should go into the folder/hierarchy of each language (like en\, jp\, cn\ etc) for easy management;
  • The game should use UTF-8 or UTF-16 encoding everywhere.
 

Oir

Active Member
Nov 5, 2018
540
750
  • Don't bake any text into code and always resolve it through a translation function that gets it from a translation file or its cache (unless it's a text script that's better localized as a whole).
  • Don't store strings in MonoBehaviours, use .csv files for that instead (with a rarely used visible character as the separator);
  • There should be some context like character name and event somewhere near their lines;
  • Common stuff should be replaced with macro strings like %gold% or \\G instead;
  • The lines of the translation file should contain both the original text and the translation;
  • Images and files should be named something like <filename>_<language code>.ext and loaded accordingly to a chosen locale;
  • Translatable images and text should be in their own asset files (like a 2Gb merged asset file with localized images is a bad idea);
  • The game should manually configure it's thread's CultureInfo to not depend on the user's unknown default locale;
  • All translatable assets should go into the folder/hierarchy of each language (like en\, jp\, cn\ etc) for easy management;
  • The game should use UTF-8 or UTF-16 encoding everywhere.
I will have to look into many of these things. I generally have my text as simple text objects in the scene; I'll have to see if I could read those from a giant text file or something which sounds like it could solve a ton of these issues.

Thank you for the comprehensive reply!