At 11:00 08/20/2001 -0300, Alejandro F. Reimondo wrote:
> >NOTICE THE (self msgAt: 'Kom0002')!
>I prefer:
>         'Kom0002' translated
>then you only have to change String and not Object

The idea of using #translated inspired me. How about using
         'That is not a valid value for logging' translated
instead? Using the actual English message as a "keyword"? It would still 
use the same idea of a message translation file, only the "keywords" would 
need to be delimited within it.

*) Reading both the code and the translation files would make a lot more 
sense, compared to just seeing keywords like "Kom0002". *) It would be an 
even simpler change to the bulk of existing code. *) There is a built in 
fallback message available should the translation file not contain a 
particular entry. *) It would be possible to use translators, like 
Bablefish, when hand translations were not yet available.

It still a good idea to use #translatedWith:, etc. for parameter binding.

One downside might be where instances of the same message in English should 
translate to different messages in different contexts in another language. 
This could be handled by a convention of appending "(#1)", etc. (where 
necessary) to the untranslated messages to differentiate them.

Another downside is that it would be a bit harder to correct or tweak an 
English version of a message, since it's being used as a "keyword". A 
possible solution, without the need to change all of the translation files, 
would be to provide the possibility of an English translation (or actually 
a correction) file. It could simply contain any "translations" from the 
original badly formulated English message to the current version. Actually, 
with that in place, it would be simple to make a tool that would update all 
of the translation files with the newer "keyword", and thereby cleanup the 
code and files when changing the English version of a message. Okay, I take 
it back -- that isn't really a downside. ;-)

Thoughts?

-Bill

-------------------------------------------
Bill Dargel            [EMAIL PROTECTED]
Shoshana Technologies
100 West Joy Road, Ann Arbor, MI 48105

Reply via email to