Website in transifex

Mike Massonnet mmassonnet at
Fri Nov 6 12:56:27 CET 2009

2009/11/5 Nick Schermer <nickschermer at>:
> Duno if i understand it correctly, but if Jerome is redesigning the
> website, it could be worth looking if we can handle translations in
> transifex. That should be fairly easy with xml and our current git
> setup.

How do you see this should be working?

I see two options:
1- use gettext.
2- use gettext as intermediate to generate arrays.

I am more in favor of solution 2. With the basic gettext functions you
have to set the locale to the exact match on the system (for French it
would be fr_FR.utf8 but not fr_FR or fr and that's on my system,
others might have UTF8 capsed). And if the locale is missing on the
system it wont work at all, in fact it needs that all locales are
installed... dunno but it is like that since years. There is an
external php-gettext library developed on launchpad that doesn't have
this problem but the last news was in 2006 and I don't like the idea
of including it.

In the benchmarking POV, unless we are enabling memcached, the loading
of the compiled po files is slow, while loading a php file with an
array is very quick. Once it is loaded it is as fast as if we would
display from arrays however.

Loading translations and displaying (run once):
gettext   0,0074100494384766   89.12%
array   0,00043296813964844   5.21%

Displaying translations already loaded (run 1000 times):
gettext   0,04879903793335   7.15%
array   0,041149139404297   6.03%

Working with intermediate files will need some sort of a small script
and generate the php array files for each language.

And now about the existing translations, it will be very hard
(impossible) to reuse them. They are mostly outdated and don't respect
any template.

I had also like to know more about Jérôme's plan indeed. I don't
remember if there was an initial thread.

> Nick


More information about the Xfce4-dev mailing list