IMHO I18N logic belongs to the presentation layer because
it's only relevant when displaying information or
handling user input.
So the EBs shouldn't know anything about different languages at all.
The presentation layer should translate the logical values
to language specific display values and back (for input).
If I understand correctly, You are already doing something
like that. I would go so far and move this translation logic
to the servlet level. You can store the locale of the current
user in the servlet session context.
Wolf
> -----Original Message-----
> From: A mailing list for Enterprise JavaBeans development
> [mailto:[EMAIL PROTECTED]]On Behalf Of Markus Hebach
> Sent: Wednesday, August 09, 2000 4:42 PM
> To: [EMAIL PROTECTED]
> Subject: Re: EJB and internationalization
>
>
> ok, then you have the language as a part of the content,
> and you can't use the DD.
>
> The design here is simple: if you have Stateful Session Beans,
> you can init it when it created, like getBean(language)
> and just call the methods, if it would be stateless you would have
> to transmit the language with every call (thats the natural
> tradeoff when
> working with stateless beans)...
>
>
> Cheers,
> Markus
>
>
> Stefan Trcek schrieb:
>
> > On Mon, 7 Aug 2000 18:15:58 +0200, Markus Hebach
> > <[EMAIL PROTECTED]> wrote:
> >
> > > Why not using the DD? The deployer could specify the
> language to use...
> > Two clients (frech/english) acces an entity bean (EB) *at the same
> > time* . The french client likes to see french text, the englisch one
> > likes better english text. However, as I understand it there is only
> > one instance of the EB (though multiple instances of a stub to the
> > EB). If I am right this problem can't be solved with the
> DD. Hope to
> > clarify it.
> >
> > > (however maybe think about your design, a name f.e. is
> the same in all langs,
> > > mostly its a matter of content which is different, which
> in turn is related to
> > > the logic of your app)
> >
> > The design is currently this way: a session bean (representing the
> > client) accesses the EB in the following manner (simplified)
> >
> > IdType id = enterpriseBean.getNameId();
> > String name = dictionary.getValue(id, language);
> > // get name string in specific language
> >
> > Instead I'd like to write
> >
> > String name = enterpriseBean.getName();
> >
[snip]
===========================================================================
To unsubscribe, send email to [EMAIL PROTECTED] and include in the body
of the message "signoff EJB-INTEREST". For general help, send email to
[EMAIL PROTECTED] and include in the body of the message "help".