You are viewing a plain text version of this content. The canonical link for it is here.
Posted to user@beehive.apache.org by Da...@cexp.com on 2007/03/28 22:40:30 UTC
netui:declareBundle and i18n
Grabbing internationalized values for static strings is straight forward
from a resource bundle. How do I grab an i18n string for a token that
would be returned from an object?
For instance,
${bundle.messages.helloWorld} for static hello String.
But let's say the value comes from pageInput:
${bundle.messages[${pageInput.helloWorld}]} and helloWorld can return
any number of tokens that are retrieved from the bundle.
I do not think scriplets play well either with this:
${bundle.messages[<%= helloWorld %>]}. Which processes first - the
scriplet of the ${}?
Any help would be gratefully appreciated.
Dan
Re: netui:declareBundle and i18n
Posted by Eddie O'Neil <ek...@gmail.com>.
Dan--
Yes, the JSP 2.0 Expression Language will correctly evaluate nested
references like this in all cases. It's a very handy EL feature. ;)
Note, which this is true of the container's expression language, it
is _not_ true for the NetUI EL that's used on the dataSource
attributes; the difference is that dataSource(s) must refer to
specific properties in order to create expressions that can be
updated.
Eddie
On 3/29/07, Dan.Doyle@cexp.com <Da...@cexp.com> wrote:
> Thanks Giovanni, I will try it out. I wasn't sure if the EL would
> resolve the variable if it was in the [].
>
> Dan
>
> -----Original Message-----
> From: Giovanni Motta [mailto:mottagio@gmail.com]
> Sent: Thursday, March 29, 2007 1:19 AM
> To: Beehive Users
> Subject: Re: netui:declareBundle and i18n
>
> Hi Dan,
>
> ${bundle.messages[pageInput.helloWorld]}
>
> should work perfectly, we use this syntax in a similar context.
>
> Giovanni.
>
>
> 2007/3/28, Dan.Doyle@cexp.com <Da...@cexp.com>:
> >
> > Grabbing internationalized values for static strings is straight
> forward
> > from a resource bundle. How do I grab an i18n string for a token that
> > would be returned from an object?
> >
> >
> >
> > For instance,
> >
> > ${bundle.messages.helloWorld} for static hello String.
> >
> >
> >
> > But let's say the value comes from pageInput:
> >
> > ${bundle.messages[${pageInput.helloWorld}]} and helloWorld can return
> > any number of tokens that are retrieved from the bundle.
> >
> >
> >
> > I do not think scriplets play well either with this:
> >
> > ${bundle.messages[<%= helloWorld %>]}. Which processes first - the
> > scriplet of the ${}?
> >
> >
> >
> > Any help would be gratefully appreciated.
> >
> >
> >
> > Dan
> >
> >
>
RE: netui:declareBundle and i18n
Posted by Da...@cexp.com.
Thanks Giovanni, I will try it out. I wasn't sure if the EL would
resolve the variable if it was in the [].
Dan
-----Original Message-----
From: Giovanni Motta [mailto:mottagio@gmail.com]
Sent: Thursday, March 29, 2007 1:19 AM
To: Beehive Users
Subject: Re: netui:declareBundle and i18n
Hi Dan,
${bundle.messages[pageInput.helloWorld]}
should work perfectly, we use this syntax in a similar context.
Giovanni.
2007/3/28, Dan.Doyle@cexp.com <Da...@cexp.com>:
>
> Grabbing internationalized values for static strings is straight
forward
> from a resource bundle. How do I grab an i18n string for a token that
> would be returned from an object?
>
>
>
> For instance,
>
> ${bundle.messages.helloWorld} for static hello String.
>
>
>
> But let's say the value comes from pageInput:
>
> ${bundle.messages[${pageInput.helloWorld}]} and helloWorld can return
> any number of tokens that are retrieved from the bundle.
>
>
>
> I do not think scriplets play well either with this:
>
> ${bundle.messages[<%= helloWorld %>]}. Which processes first - the
> scriplet of the ${}?
>
>
>
> Any help would be gratefully appreciated.
>
>
>
> Dan
>
>
Re: netui:declareBundle and i18n
Posted by Giovanni Motta <mo...@gmail.com>.
Hi Dan,
${bundle.messages[pageInput.helloWorld]}
should work perfectly, we use this syntax in a similar context.
Giovanni.
2007/3/28, Dan.Doyle@cexp.com <Da...@cexp.com>:
>
> Grabbing internationalized values for static strings is straight forward
> from a resource bundle. How do I grab an i18n string for a token that
> would be returned from an object?
>
>
>
> For instance,
>
> ${bundle.messages.helloWorld} for static hello String.
>
>
>
> But let's say the value comes from pageInput:
>
> ${bundle.messages[${pageInput.helloWorld}]} and helloWorld can return
> any number of tokens that are retrieved from the bundle.
>
>
>
> I do not think scriplets play well either with this:
>
> ${bundle.messages[<%= helloWorld %>]}. Which processes first - the
> scriplet of the ${}?
>
>
>
> Any help would be gratefully appreciated.
>
>
>
> Dan
>
>