Thanks a lot Carlin!
Not sure what kind of results this would produce without trying out myself but
assuming it will translate the month based on visitors locals (stored in the
session).
What if one wants to localize the date pattern itself as well? Like we know in
many occasions date format varies between countries. How could that be resolved
using the dateFormat tag ?
For example:
31.12.2006 or 31. Tammikuuta 2006 (Finland)
12/31/2006 or January 31st 2006 (U.S)
Thanks again
Mika
-----Alkuperäinen viesti-----
Lähettäjä: Carlin Rogers [mailto:[EMAIL PROTECTED]
Lähetetty: ke 20.9.2006 16:05
Vastaanottaja: Beehive Users
Kopio:
Aihe: Re: dateFormat localization question
Hi Mika,
One possible solution would be to create a getter method,
getLanguage(), on the page flow that returns the language value from
the user's locale in the session. The PageFlowController class that a
user extends has a protected method, getLocale(), that returns the
"currently selected Locale, stored in the session." Then the language
value of the Locale object could be returned from the page flow
method, getLocale().
In the JSP, the expression ${pageFlow.language} would get the
language value at runtime from the page flow. From the example you
provided, the formatDate tag might look like this...
<netui:formatDate pattern="MMMM dd, yyyy"
language="${pageFlow.language}"/>
Others on the list might have some additional thoughts as well. Hope
that helps.
Kind regards,
Carlin
On 9/20/06, Mika Rinne <[EMAIL PROTECTED]> wrote:
> Hi everyone,
>
> I recently came accross this question but couldn't find an answer.
Maybe someone of you are able to help:
>
> "I am using the netui:formatDate tag as follows:
>
> <netui:label value="{container.item.publishedDate}"
defaultValue=" ">"><netui:formatDate pattern="MMMM dd, yyyy"
language="en"/></netui:label>
>
> I would like to have language attribute set at runtime via
session/request/pageflow. It doesn't seem to allow.
>
> I would like to localize the date at runtime, and cannot fix it by
using a specific language."
>
> Thanks & regards
>
> Mika Rinne
>
> BEA Systems, Inc
>
> >>Register now for BEA World 2006 --- See
http://www.bea.com/beaworld<<
>
_______________________________________________________________________
> Notice: This email message, together with any attachments, may
contain
> information of BEA Systems, Inc., its subsidiaries and
affiliated
> entities, that may be confidential, proprietary, copyrighted
and/or
> legally privileged, and is intended solely for the use of the
individual
> or entity named in this message. If you are not the intended
recipient,
> and have received this message in error, please immediately return
this
> by email and then delete it.
>
>>Register now for BEA World 2006 --- See http://www.bea.com/beaworld<<
_______________________________________________________________________
Notice: This email message, together with any attachments, may contain
information of BEA Systems, Inc., its subsidiaries and affiliated
entities, that may be confidential, proprietary, copyrighted and/or
legally privileged, and is intended solely for the use of the individual
or entity named in this message. If you are not the intended recipient,
and have received this message in error, please immediately return this
by email and then delete it.