Hi, 

several month ago, I had a similar question without an answer.

Log4j has some methods for it: Category.l7dlog()
However this does not fit to my requirements, because the message is translated during 
creating and not during writing by an appender. I call this lazy localisation. The 
lazy localiszation has the advantage, that you are able to write a xxx_en.log and a 
xxx_de.log with the same messages but different localisations.
If you need that, you have to do:
 - implement your own log methods like: localisedInfo(String key, Object[] params)
 - you need your specialised LoggingEvent like LocalisedLoggingEvent
 - you need special appender which have additional paramter for the localisation

I have such implementations if you are interested in.

Regards,
Kai Pr�nte

-----Urspr�ngliche Nachricht-----
Von: [EMAIL PROTECTED]
[mailto:[EMAIL PROTECTED]
Gesendet: Donnerstag, 4. M�rz 2004 16:17
An: Log4J Users List
Betreff: Internationalization with log4j ?







Greetings,

I intend to realize my logging in my project with the log4j package, but I
need the internationalization of looging messages, e.g. written in German
or English language in a file depend on an attribut setting.
But I don't know to do this for the best, in a simple way.
In SYSLOG their are codes for facility/severity, which can be transformed
into the right text.
But how to manage the message itself, which normally is written in const
string in source code.

Thoughts and ideas about possible solutions would be very appreciated.


Regards,
Juergen Bauer


---------------------------------------------------------------------
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]


---------------------------------------------------------------------
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]

Reply via email to