In-Game Language Translations


By ShadowApex 29 Apr 2016 17:20

Lead Developer · 374 comments

I'm happy to announce that Tuxemon now fully supports in-game language translation to a variety of languages in the latest development version! Much of the Translator code was based off of tamashihoshi's examples that he provided.

How it works

Right now this is how in-game translation is currently handled:

  • Game language is determined via the locale config option under the [game] section in ~/.tuxemon/tuxemon.cfg.
  • Based on locale setting, in-game text will be pulled from resources/db/locale/<locale>.json
  • If no locale is set in tuxemon.cfg, "en_US" is selected by default.
  • If a translation does not exist for a certain word/phrase in a given language, translation will fall back to "en_US". If a translation doesn't exist in "en_US" either, "Locale Error" text will be displayed instead.
  • All items and techniques have a name_trans and description_trans property that will be used for translation lookup. The name and description properties will be loaded as a fall back.