Internationalization: XLIFF instead of gettext?

293 views
Skip to first unread message

Richard

unread,
Dec 17, 2008, 7:07:58 PM12/17/08
to Django users
Searching the archives reveals no discussion of XLIFF.

How are people managing their internationalization and localization
data if it's in XLIFF format? Just convert the XLIFF data to PO using
pocompile and use gettext as normal? If so, I'd like to hear about
experiences/problems/etc.


Are there plans to bring XLIFF native internationalization to Django?

Thanks,
Richard

Malcolm Tredinnick

unread,
Dec 17, 2008, 7:24:03 PM12/17/08
to django...@googlegroups.com

Not really. Although I have been looking at a restructured text -> XLIFF
(and back) converter for the document translators. Unfortunately, since
that requires positive amounts of free time, which I don't have, it's
not exactly progressing quickly.

Gettext-based translations are pretty much the norm in the open source
world for program-level translations. XLIFF is a better technology at
the higher-content plane (things that require paragraphs, and above,
say), but it also has less broad tool support and is somewhat overkill
for the small sentence fragment structure of code-presented strings. But
lowest barrier to entry is a requirement when you're seeking volunteer
translators, which is why we use gettext. It's simple to get up and
running and well known.

All that being said, it probably wouldn't be too hard, if you have
something that understands XLIFF in Python to write appropriate filters
and template tags and functions similar to ugettext() that works with
your XLIFF files. You'll have access to the current active locale, just
like the gettext stuff does, so it's just a matter of looking up the
right file to retrieve the translations.

Regards,
Malcolm

Reply all
Reply to author
Forward
0 new messages