Thanks a lot Frank,
Finally I found as well that I can getLanguage instead of getDisplay and
check the result but your solution is better.

Another question: I am using this method to convert my String into Date:
public static Date stringToDate(String sDate, String sFormat) throws
Exception {
                SimpleDateFormat sdf = new SimpleDateFormat(sFormat);
                return sdf.parse(sDate);
        }

My String is this: Sat May 31 01:00:00 CET 1952
What is this format? Should I use that for sFormat: 
 ? MM DD hh:nn:ss CET YYYY 

Thanks again
Soph.

-----Message d'origine-----
De : Frank Felix Debatin [mailto:[EMAIL PROTECTED] 
Envoyé : mercredi 31 mai 2006 11:55
À : 'MyFaces Discussion'; [EMAIL PROTECTED]
Objet : RE: Locale

Sophie, 

just use getDisplayLanguage(Locale.US), for example 
Locale.FR.getDisplayLanguage(Locale.US) should return
French. 

Frank Felix

> -----Original Message-----
> From: [EMAIL PROTECTED] [mailto:[EMAIL PROTECTED]

> Sent: Wednesday, May 31, 2006 11:20 AM
> To: 'MyFaces Discussion'
> Subject: Locale
> 
> 
> Hi!
> 
> I got into troubles with the method getDisplayLanguage
from 
> java.util.locale.
> 
> The result of this method in my program is that my
available 
> languages are displayed in French (anglais, français). I 
> suppose because my Windows is in French. But is there a
way 
> to return the English version of these languages for
example 
> (English, French)?
> 
> Thanks in advance
> Best
> Sophie
> 


__________ NOD32 1.1569 (20060531) Information __________

This message was checked by NOD32 antivirus system.
http://www.eset.com


Reply via email to