Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

How to convince fellow programmers to use Gettext?

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.

like image 250
Rene Saarsoo Avatar asked Apr 29 '09 13:04

Rene Saarsoo


2 Answers

What your doing wrong is telling them how to fix a problem that in their mind does not exist.

You need to make them see that it is in fact a problem that needs to be resolved.

Edit:
Glad to see you got there in the end, the second lanuage appears to have made them acknowledge the elephant in the room!

like image 150
stevehipwell Avatar answered Sep 23 '22 14:09

stevehipwell


I can see several options for you:

  • You could try estimating the time (money) saved by using your method.
  • You could show (demo?) how much easier it is to maintain (less headaches).
  • You could go ahead and use the system that is already in place.
like image 28
chills42 Avatar answered Sep 21 '22 14:09

chills42