I have used GNU Gettext successfully in many projects I have worked in, but at my latest job I have suddenly found myself forced to work with a really awkward localization system.
The current system stores translations in database and adding new translation goes something like this:
- add function call with translation key to source code, e.g.
print translate('foo');
- add few SQL INSERT statements to
translations.sql
file. - create file with name
(current revision nr + 1).sql
- execute .sql file in database.
- commit your changes (before somebody else manages to commit and change current revision number).
All this process is completely manual and you have to repeat almost all of it even when you need to fix a small typo. There is no support for plural forms. The whole translations database is quite a mess as translations almost never get deleted from it - only added and updated.
I have tried several arguments to convince other developers (especially one particular dev):
- I have talked about Gettext being established standard and that there are many tools available for working with PO files.
- I have tried to explain that storing translations in database has no benefits over storing them to text file - we are just retrieving translations from database by key, nothing more.
- The other developer is working on PHP part of our app and PHP has Gettext built in. I'm working on JavaScript side, which doesn't have Gettext support, but I have built my own tools for it in the past.
- Our app isn't so big, that converting from old system to Gettext would take a lot of time even when done manually and I'm quite sure it can be easily automated.
- I have even successfully used Gettext for one smaller app in our company.
But people still aren't convinced. What might I be doing wrong?
Edit:
A few months after posting this question we are now finally transitioning to Gettext. When we needed to support more than two languages the disadvantages of our current system bacame more apparent to those resisting it so far.