OK thanks but I already think to put the user date pattern in the i18n resources files, but I just would like to have a programmatic way to read the date pattern instead of the other one.
Thanks for you response

Martin Gainty wrote:

Xavier-

WebLogic solution
http://e-docs.bea.com/wls/docs81/console_ext/localization.html#1104706

But in In the purest Java sense you can populate your Message_fr_FR.properties Application Resources file http://www.javaworld.com/javaworld/jw-03-2000/jw-03-ssj-jsp.html#resources

The construct your simpleDateFormat using string passed in and the supplied Locale http://java.sun.com/j2se/1.4.2/docs/api/java/text/SimpleDateFormat.html#SimpleDateFormat(java.lang.String,%20java.util.Locale)
Important Note: Message items can be referenced via Bean:message taglib

Anyone else ?
Martin-


----- Original Message ----- From: "Xavier Vanderstukken" <[EMAIL PROTECTED]>
To: "Struts Users Mailing List" <user@struts.apache.org>
Sent: Saturday, November 05, 2005 5:13 AM
Subject: Date pattern


I would like to retrieve the date format pattern according to the user Locale.

I  do the following to retrieve the Struts Locale :
Locale current=(Locale)this.pageContext.getSession().getAttribute(Globals.LOCALE_KEY);
if(current==null)
           current=Locale.US;

And now I would like to read something like : MM/DD/YYYY for US locale or DD/MM/YYYY for FR.
How can I do that?

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



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



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

Reply via email to