Messages are loaded just-in-time, using the Registry's locale.

For me, the issue is that the Locale is fixed which works fine (I
guess) for a standalone program, but becomes problematic for web apps
(Tapestry apps) where different concurrent users need messages in
different locales.

I suppose we could implement a kind of thread-local to store the
user's locale. This would be used when accessing localized messages
from code (i.e., via a Messages object).

The problem is the %key mechanism in contributions, which is another
way to allow access to localized messages. These become strings, or
parts of strings, that then can "flow" (via contributions, schemas,
collaborating services, etc.) into all kinds of unpredictable places. 
So what locale is used for them ... and how do they get properly
localized?  I don't have a solution.

To some degree, what's needed iis a way to keep messages virtual (keys
+ parameters) right up until there's a known locale, then fold them
down to localized strings. I can see this as a service on top of
HiveMind.  I'd like one solution that covers everything, magically,
but I don't seem to have it!


On Fri, 10 Sep 2004 16:09:01 +0200, Mika�l Cluseau <[EMAIL PROTECTED]> wrote:
> 
> 
> James Carman wrote:
> > The locale-specific registry building has always had a bad smell to me.
> > I just don't know if it belongs in a "microkernel" like HiveMind.  Sure,
> > we should provide a service that allows access to internationalized
> > messages, but that doesn't have to be part of the core framework.  Maybe
> > I'm not seeing the benefits.  Am I missing something?
> >
> 
> I thought it was for module messages (i.e. to localize logs). Indeed,
> they need to be loaded by HiveMind just-in-time, depending on the
> system's default locale.
> 
> I may miss something too ;-)
> 
> --
> Mika�l
> 
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: [EMAIL PROTECTED]
> For additional commands, e-mail: [EMAIL PROTECTED]
> 
> 



-- 
Howard M. Lewis Ship
Independent J2EE / Open-Source Java Consultant
Creator, Jakarta Tapestry
Creator, Jakarta HiveMind
http://howardlewisship.com

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

Reply via email to