views:

62

answers:

2

I am working on a large Java 1.4.2 project (~3000 files...) that contain lots of GUI widgets. There is a requirement to translate all text on the UI widgets to different languages (Italian, French, German), only European languages at this point.

  1. How would you go about designing a solution for such a problem?
  2. How would you verify that solution once implemented?
+3  A: 
  1. I would use a solution similar to the properties files used for widgets in the Swing Application Framework. That would allow you to put all the relevant properties (button names, tooltips, etc.) into something akin to massiveProjectFrench.properties or massiveProjectGerman.properties.

  2. At that point, you could assign each language version to a native speaker / expert to ensure that your spelling, grammar (fragments), etc. are correct.

    As a separate effort, you'll want to run each version to ensure that button names and other properties that may be clipped actually fit within the appropriate bounds. If not, you'll need to either do some language-appropriate abbreviation or redesign to allow for larger / smaller scopes.

Bob Cross
+1 for .properties files. It's common for translation services to receive these files and return you the translated text. They hate it though...
Damo
@Damo Why do they hate it?Is there a way to cut down on the effort of manually going over the whole code and changing the widgets to read their text from the .properties files?
Ido
I think Damo was talking about translating properties files and being asked to translate them. Basically, it's just boring work: coming up with hundreds of word for word translations is simply dull.
Bob Cross
and sometimes they have some mis-translation because of lack of context, which is always a bunch of laughs =)
Chii
A: 

Just a general thought.. You could build one or more associative arrays that hold all the texts and declare it as constants. Then, import them differently depending on what language you need.

evilpenguin