Author Topic: Using Gettext (or similar) for translations  (Read 4193 times)

Offline winterheart

  • Colonel
  • ****
  • Posts: 180
  • Fellow Squaddie
    • View Profile
Using Gettext (or similar) for translations
« on: April 29, 2013, 02:00:10 pm »
Currently in OpenXcom we have own localization framework based on text files. With some pro (no additional dependencies, fastest realization) we have some drawbacks (each new/modified string require manual adding/modifying for each lang-file). I suggest to start using tinygettext, so we can achieve follow benefits:
- Each new/modified string can be automatically updated in master .pot-file and then on each language file;
- Translators gain common translation format of file, which can be translated in special editor (poedit, for example);
- We can even export translations to foreign site for translations (Transifex).

So, what are you thinking about this idea?

Offline SupSuper

  • Lazy Developer
  • Administrator
  • Commander
  • *****
  • Posts: 2162
    • View Profile
Re: Using Gettext (or similar) for translations
« Reply #1 on: April 29, 2013, 07:45:27 pm »
As a user, I personally like just having all the strings in a raw text file so I can just throw them in a text editor and spell checker and whatever without going through obscure interfaces and formats and whatever. :P

As a programmer, the reason I didn't use gettext (or similar) is purely a technical one. All those translation libraries just let you "translate text strings" and that's it, which works fine if you just have a bunch of hardcoded strings that need translating. But once you need to make them modular and moddable that doesn't work anymore, the strings need to have IDs so they can be associated with UI/rulesets, need to be modular to support being split and loaded from different files, etc.

You will notice every moddable game ends up rolling their own format for the same reasons. Yeah maintaining them can be a pain, but nothing that can't be solved with making some support tools down the line.