For ages, we've been using PHP variables to do the localisation. It was not really easy to maintain, but it worked quite well. However impossibility of using standard tools for translations was still annoying. So I really wanted to move to some standard, what seems to be Gettext.
Once I've played with Gettext in PHP, I realised how broken it is and that it is not a good idea to use it. However it is not that hard to implement in PHP and some people already did that. From these findings it was just a small step to implement it.
Well not really small step, because at first I've chosen the more complicated way and tried to create sed magic to move all strings to places where they belong. But this turned out to be nearly impossible and at FOSDEM I realised that there is also much easier way to just keep the messages in one file and migrate them as needed. This way the migration is really fast and not touching most of the code.
So here we are. Currently it is in separate branch (called
I hope to merge it soon, because I'm not aware of any problems right now.
The nice benefit this gives to us is web based interface for translations.