You can use the getDisplayLanguage in java.util.Locale to do this:

<%= request.getLocale().getDisplayLanguage(request.getLocale) %>

This displays the language of the locale in the locale you specify. If
you don't specify a locale it will use the default locale of the system.

Regards,

Thad Smith

-----Original Message-----
From: Joe Hertz [mailto:[EMAIL PROTECTED] 
Sent: Monday, March 28, 2005 11:57 AM
To: 'Struts Users Mailing List'
Subject: locale attribute in <bean:message>

An utter shot in the dark here..

I'm trying to force the printing of language names into their native
languages. That is to say English is "English" and French would be
"francais".

I realize that if I know what language I want to put display it in, I
don't
_really_ need a bean:message tag, but it's far more readable than
putting
Unicode into the web pages themselves since I do this every where else.

(No, the locale= attribute doesn't take a language parameter. It wants a
session scoped bean with a Locale object).

So is there a way to force a specific language to be used in a
<bean:message> tag?




---------------------------------------------------------------------
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