You are viewing a plain text version of this content. The canonical link for it is here.
Posted to user@struts.apache.org by Kranti Parisa <kr...@gmail.com> on 2006/12/12 18:38:51 UTC
internationalization in struts
Hi,
i am working on internationalization in struts.
for this i did the following
1) WEB-INF/classes/resources folder defined all the files
example : application.properties, application_fr.properties ..etc
2) in each file defined the labels
example
label.firstname=First Name
3) in struts-config.xml file defined the following
<message-resources parameter="resources.application"/>
4) when user successfully logs in setting the Globals.LOCALE_KEY into
session with user specific locale
5) in jsp
<bean:message key="label.firstname"/>
i suppose the above steps should work.
but its displaying null and when i do <message-resources parameter="
resources.application" null="false"/>
then its printing it as ???label.firstname???
which is nothing but null.
Please do suggest/help me for this.
Regards
Kranti
Re: internationalization in struts
Posted by Christopher Schultz <ch...@christopherschultz.net>.
-----BEGIN PGP SIGNED MESSAGE-----
Hash: SHA1
Kranti,
Kranti Parisa wrote:
> for this i did the following
>
> 1) WEB-INF/classes/resources folder defined all the files
> example : application.properties, application_fr.properties ..etc
[snip]
> 3) in struts-config.xml file defined the following
> <message-resources parameter="resources.application"/>
Putting your properties file into a subdirectory may require you to use
a slash (/) instead of a dot (.) in the name of the bundle. So, try this
instead:
<message-resources parameter="resources/application" />
and see if that works.
If it doesn't work, try moving your properties file into WEB-INF/classes
and removing the confusion of the added subdirectory. Once you get
everything working, you can experiment with changing one thing at a time
to move your files to your preferred location.
- -chris
-----BEGIN PGP SIGNATURE-----
Version: GnuPG v1.4.6 (MingW32)
Comment: Using GnuPG with Mozilla - http://enigmail.mozdev.org
iD8DBQFFfwtu9CaO5/Lv0PARAgF0AKCAVIcDZOoDxusV3oPkgHgRCodXYwCgi8Qg
RnAZHWDuz407MverzFQEVeg=
=Qie8
-----END PGP SIGNATURE-----
---------------------------------------------------------------------
To unsubscribe, e-mail: user-unsubscribe@struts.apache.org
For additional commands, e-mail: user-help@struts.apache.org