Hello Eric,
To set the locale that struts uses, I put this code at the top of my
index.jsp:
<%
Locale locale = request.getLocale();
session.setAttribute(Action.LOCALE_KEY, locale);
%>
Denis Hanson
-----Original Message-----
From: eric sperano [mailto:[EMAIL PROTECTED]]
Sent: Tuesday, January 16, 2001 4:42 PM
To: [EMAIL PROTECTED]
Subject: i18n
Hello everyone,
i'm a new struts user and i have a question about i18n.
i did two properties files, let's say:
com.myproject.ApplicationResources.properties (english)
com.myproject.ApplicationResources_fr.properties (french)
in my web.xml, i set the init-param "application" to
"com.myproject.ApplicationResources"
i load my servlet and the log says it has load my ResourceBundle
successfully.
but now, how can i associate a specific language to a HttpSession??
as an example, i used the logon.jsp shipped with the struts example..
i set my browser (ie 5) to select French as my "favorite" language, but
when i access the logon.jsp, it's always the english message that are
printed..
i added a print out out request.getLocale() in my jsp and it prints the
good locale, so my browser config is correct.
can someone please indicate me what is missing/wrong?
thanks a lot! and keep up the good work.
eric sperano
modesys informatique