geronimo-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Cabrera, Alan" <>
Subject RE: [i18n] Hardcoded message strings
Date Mon, 25 Aug 2003 13:51:30 GMT

> -----Original Message-----
> From: Simon Brooke [] 
> FWIW my opinion is that message localisation should happen as 
> close to the 
> point where it's printed as possible, so definitely the 
> printing machine. The 
> other thing is I'm at present dealing with a number of quite 
> large systems 
> which have been built without thought to i18n and to which I'm now 
> retrofitting i18n. The method I decided to use was to use the english 
> language strings as keys into the resources files which contain 
> other-language variants. I'm now convinced that was a 
> mistake, and that I 
> should have replaced all strings with short tokens, which 
> would have been 
> translated into locale language by a resource file. To be 
> explicit I would 
> now have three types of keys
> 	ERR1234 would be an error key, something thrown by an 
> exception which
> 	 	actually representa failure of the computation.
> 	MESS1234 would be a message key (used for things like menu
> 		items, widget names, prombpt strings etc)
> 	INFO1234 would be an 'informational' key, something 
> thrown by an exception
> 		 but expected to be caught.
> This has the downside that it makes the code less easy to 
> read (you can't see 
> the error messages in the code) but the upside that it makes 
> the resource 
> files infinitely easier to maintain.

I have a fair amount of experience w/ i18n and have to say that having codes
like the ones you've listed above makes the translating process more
difficult.  I used to index my messages using the above codes and I would
get questions from the contractor like "I have a question about ERR5368, is
it possible for the first argument to be plural?"  Gee, what was ERR5368?

>From my experience, the following codes are much more helpful for the
developer, reader of the code, and the person performing the translating:


I am very interested in why you went from using phrases in your code to
using opaque codes.


      Visit our Internet site at 

Get closer to the financial markets with Reuters Messaging - for more
information and to register, visit <> 

Any views expressed in this message are those of  the  individual sender,
except  where  the sender specifically states them to be the views of The
Reuters Group.

View raw message