Sorting lists of items in source and target


msoutopico's picture

This is my first message to this forum, so hello everyone! Pleased to be here :) 

I have to prepare some files for translation, they contain lists of countries, and the lists must be sorted in all versions. As the name of the countries is different in different languages, the order of items will change to when sorted alphabetically. 

In source it is:

United Kingdom

It French it should be:

Royaume Uni

My client wants the translators to translate "Rwanda" as "Royaume Uni" and "United Kingdom" as "Rwande" and so on and so forth to have the correct sorting in the target version.

Rwanda -> Royaume Uni
United Kingdom -> Rwande

However, that complicates a lot the job of the translators and makes the TM unusable for later projects. 

This is a simplified example with two countries, but imagine what this can be like with 10 or 20 countries, or more. 

I would like to follow a regular translation procedure and handle the sorting independently. If this is a list in HTML, I think the sorting can be done in the final page with some Javascript. 

However, I wonder whether there's some more general well-established best practice to deal with this kind of situation, which I suppose must be frequent. Any suggestions?

Thank you very much in advance for any suggestions.

Cheers, Manuel

gmoskowitz's picture
Joined: 12/10/2008
Re: Sorting lists of items in source and target


This is an interesting problem because there are several different answers depending on what you want to translate. I'll start with the exact case you start with - country names.

The names of countries in xTuple ERP are stored in the database. If you have been given permission, you can update those records through the xTuple ERP desktop client application: System > Setup > Countries, then edit each one to use the French name. Be very careful to change only the name of the country and possibly the currency symbol, not the abbreviation or country code or country number. Translate the country name directly (Rwanda -> Rwande). As you said, the sorting should be done by the program, not the translator.

Note that this translation is private to your database and the changed names the only names available to any person who uses your database. It is difficult to share with other companies using xTuple ERP. The same general method can be used with other data in the database. You must be very careful and know exactly what you are doing, though, since translating the wrong field can cause the application to stop working correctly.

Other text, such as menu items and button names, is translated differently. Those translations are fairly easy to share with other xTuple ERP users. In addition, every person can see these things in his or her own language.

Look at the documentation for Qt Linguist and our starter translation files if you are interested in translating our desktop client application, or the mobile web translation files if you use the mobile web client.

I hope this information is enough for you to get started.