views:

701

answers:

5

I have a freeware scientific app that is used by thousands of people in nearly 100 countries. Many have offered to translate for free. Now that D2009 makes this easier (with integrated and external localization tools, plus native Unicode support) I'd like to make this happen for a few languages and steadily add as many as user energy will support.

I'm thinking that I'll distribute a spreadsheet with a list of strings (dozens but not hundreds) to be translated, have them return it, and compare submissions in the same language from 2-3 users then work to resolve discrepancies by consensus. Then I'll incorporate the localizations using the Integrated Translation Environment, and distribute localized updates.

Has anyone delegated translation to users? Any gotchas, D2009-specific or otherwise?

EDIT: Has anyone compared the localization support built into D2009 versus dxgettext?

+4  A: 

I have... There can be some challenges.

  • a string does not mean much in itself, it needs a context.
  • corollary, the same string can need to have more than one translation.
  • screen real estate: beware of varying length depending on the language, for instance, French tends to be more verbose than English.
  • unless you are proficient in a given language, you won't be able to evaluate the discrepancies.
François
Thanks - these are helpful. Since most strings have explanatory hint text associated with them, and those need to be translated too, I was thinking of providing them in paired columns of the spreadsheet. Une pierre, deux coups, n'est-ce pas?
Argalatyr
+5  A: 

I have never been a friend of proprietary localization tools for Freeware or Open Source applications. Using dxgettext, the Delphi port of GNU gettext looks like a much better option to me:

  • Integration into the program (even much later than its development) is easy.
  • Extraction of translatable strings can be done by command line programs and is therefore easily introduced into an automated build.
  • A new translation can be added simply by creating a new directory with the correct structure, copying the empty translation file into it, and starting to translate the strings. This is something each user can do for themselves, there's no need to involve the original author for creation of a new translation. There is also instant gratification with this process - once the program is restarted the new translations are shown immediately.
  • Changing an existing translation is even easier than creating a new one. Thus if a user finds spelling or other errors or needs for improvement in the translation they can correct them easily and send the changes to the author.
  • New program versions work with old translations, the system degrades very gracefully - new and untranslated strings are simply shown unmodified.
  • Translations can be made using only notepad, but there are several free tools for creating and managing translation files too; see the links on the dxgettext page. They are localized themselves, and have some advantages over a spreadsheet as well:
    • The location of the strings in the source code can be shown (makes sense only for Open Source apps, of course).
    • The percentage of translated strings is shown.
    • Modifications to already translated strings are highlighted too.
  • The whole system is mature and future-proof - I have used dxgettext for Delphi 4 programs, and there should be no changes necessary for Delphi 2009 even - translation files have always been UTF-8 encoded.

Using a spreadsheet for the translation doesn't seem a workable solution to me once you have more than a few languages. Suppose a new program version adds 2 new strings and changes 10 strings only slightly - wouldn't you need to add the new strings to and highlight the changed strings in all of the several dozen spreadsheet files and send them again to your translators? Using dxgettext you just mail the changed po file to all of them.

Edit:

There is an interesting comment about the problems there may be with dxgettext and libraries. I did never experience this, as I have stopped using resource strings altogether. The biggest part of our programs are in German, and only a few are in English or translated into several languages.

Our internal libraries use "_(...)" around all translatable strings. There are defines ENGLISH and USEGETTEXT that are set on a per-project basis. If ENGLISH or USEGETTEXT are defined, then the English texts are compiled into the DCUs, else the German text is compiled into the DCUs. If USEGETTEXT is not defined "_()" is compiled as a function that returns its parameter as-is, else the dxgettext translation lookup is used.

mghie
Thanks for your detailed reply - a lot to think about, especially because I like empowering the user. Does this solution support multibyte characters?
Argalatyr
I see "full Unicode support" on the dxgettext page, so that looks like a "yes" to my question.
Argalatyr
I am also in favor of dxgettext. But there are some gotchas you will probably only find when your project has well advanced:Usually, the translations are global, meaning that sometimes a translation that fits a phrase at one place of the program, may not fit it at a different place.Support for libraries is also not obvious: I have started to use a "domain" for each library, but that means I cannot use resource strings there because then I would have to register the domain globally again.But overall I really like dxgettext.
dummzeuch
@dummzeuch: Interesting comment. The point about different meanings of the same string in different program parts is taken, it is however not specific to gettext, it is a general problem. If the strings in the program are not final (meaning there are "translations" for EN_GB and EN_US as well) then it is possible to change occurences of strings that should mean different things. This is a good idea anyway, because it allows for changes to the English text without affecting all translation files.
mghie
+2  A: 

I've used TsiLang Translation Suite for enabling end users to translate. I modified the code to allow encryption so that if someone does a really good job they can protect their name against a translation file, but in general the idea is that people can share their translations, and add/edit any small part they wish to. Given that it all happens within the app, and with instant visibility, it works really nicely.

mj2008
+2  A: 

As you have mentioned, D2009 comes with localization tools. Why not simply using them? AFAIK you can distribute the external translation manager (etm.exe). Do you need anything else?

Also, localization is more than just translating text. ETM also supports translation of .dfm resources.

TOndrej
I'd love to see what others think about this. I am tempted by the D2009 tools. There are some excellent points regarding dxgettext, but it would be helpful to hear from people who've tried both.
Argalatyr
@Argalatyr: I've tried ETM, and IMHO it's simply horrible. I would never give it to a non-programmer for translation purposes, the translatable strings are drowned out by all the (non-string even) properties it shows. What if some well-meaning person translates alClient to alKlient? The UI is also bad for translating purposes, it is much more geared towards management of the project than towards text editing. Not everything is good just because it comes in the Delphi box.
mghie
@TOndrej: Adjusting all DFMs for the purpose of translations is only necessary because the VCL has no proper way of dynamic control layout according to the changing text widths. This places the burden on the developer / translator, when the code should be able to handle it on its own.
mghie
@mghie: In some cases you also have to take into account non-text locale-specific resources, e.g. images, sounds etc. Text only would not be sufficient even with dynamic layout.
TOndrej
@TOndrej: A valid point. I haven't had to deal with images, sounds and other such resources yet, but the locale subdirectory would be a perfect place to put them as well - I'd consider this another advantage of the dxgettext approach.
mghie
+1  A: 

For completeness, here is another Delphi localization tool called Delphi Localizer I recently found that looks to be well designed and polished. The tool is free for commercial use with the exception of Government projects (not exactly sure why the exception).

FWIW I have uses TsiLang Translation Suite in the past and am currently working on another project using the localization tools shipped with DevExpress VCL. The later integrates nicely with their components as well as third-party components.

David Taylor