Dmitry,
Dmitry Yershov wrote:
> Then, one of the following approaches should be chosen:
> 1. Unique localized message is presented by 2 numbers in
> resource bundle (CLASSLIB schema).
> 2. Unique localized message is presented by string in resource
> bundle (see ResourceBoundle class from log4cxx).
If I were you, I would definitely go (2) path of meaningful string keys
in resource bundle.
> Then, one of the following suggestions should be selected:
> 1. Substitutional parameters in message pattern should be
> presented by printf format specification fields. i.e.: "Message
> pattern with integer parameter: %d".
> 2. Substitutional parameters in message pattern should be
> presented by {i} fields. i.e.: "Message pattern with one parameter:
> {0}".
I think this is unimportant, and we may leave the choice to be driven
by implementation details (i.e. by the back-end that we end up using
for formatting localized messages).
> And finally, should we introduce new defines in VM (i.e. L7DECHO)
> for internationalization purposes or should redevelop existent ones to
> support internationalization?
I would suggest using a distinct set of defines, though they will not be much
of them, may be
LINFO2(category, message)
LECHO(message)
Note, that the option of changing semantics of ECHO and INFO/INFO2 to be
localized still remains available, and we can do that later if we find it
appropriate.
> P.s. One more question is tormented me: Should we internationalize LOG
> and TRACE (they are for debug version of VM only) output?
I agree with Mikhail and Egor that LOG and TRACE should *not* be localized,
as they are not intended for end users.