Alex Rivera | Logout

i18n - best practices for internationalization - XLIFF, gettext, INI, ...?

Asked 2008-11-11T07:41:25.047
33

EDIT: I would really like to see some general discussion about the formats, their pros and cons!

EDIT2: The 'bounty didn't really help to create the needed discussion, there are a few interesting answers but the comprehensive coverage of the topic is still missing. Six persons marked the question as favourites, which shows me that there is an interest in this discussion.

When deciding about internationalization the toughest part IMO is the choice of storage format.

For example the Zend PHP Framework offers the following adapters which cover pretty much all my options:

  • Array : no, hard to maintain
  • CSV : don't know, possible problems with encoding
  • Gettext : frequently used, poEdit for all platforms available BUT complicated
  • INI : don't know, possible problems with encoding
  • TBX : no clue
  • TMX : too much of a big thing? no editors freely available.
  • QT : not very widespread, no free tools
  • XLIFF : the comming standard? BUT no free tools available.
  • XMLTM : no, not what I need

basically I'm stuck with the 4 'bold' choices. I would like to use INI files but I'm reading about the encoding problems... is it really a problem, if I use strict UTF-8 (files, connections, db, etc.)?

I'm on Windows and I tried to figure out how poEdit functions but just didn't manage. No tutorials on the web either, is gettext still a choice or an endangered species anyways?

What about XLIFF, has anybody worked with it? Any tips on what tools to use?

Any ideas for Eclipse integration of any of these technologies?

Edit
Report

2 Answers

1

I worked with two of these formats on the l18n side: TMX and XLIFF. They are pretty similar. TMX is more popular nowdays, but XLIFF is gaining support quickly. There was at least one free XLIFF editor when I last looked into it: Transolution but it is not being developed now.

answered 2008-11-17T00:10:12.687
0

We just store the strings in the DB and have a translator mode built into the application to handle actually adding strings for different languages.

In the application we use various tricks to create text ids, like

£("btn_save")
£(Order.class,"amt")

The translations is loaded from the db when the system boots, or when a reload is manually triggered. The £ method takes care of looking up the translated string according the the language specified in the user session.

answered 2009-02-01T22:26:57.337

Your Answer