You are viewing a plain text version of this content. The canonical link for it is here.
Posted to user@struts.apache.org by "Filippov, Andrey" <an...@t-systems.ru> on 2007/11/22 09:33:50 UTC
struts2 & i18n...
Hi everybody!
I am developing WEBApp now and there is a problem... Well actually - 2
problems...
My application should be bilingual. So I have 2 bundle files -
locale_ru_Ru.properties and locale_en_Us.properties. As I understand
struts2 tag <s:i18n/> automatically detect the user locale setting and
choose the right bundle for it. So I have the following:
<s:i18n name="com.fil.struts2.actions.locale" >
<table>
<tr bgColor=#bcc2c8 height="7">
<td><s:text name = "body1"/></td>
<td><s:text name = "body2"/></td>
<td><s:text name = "body3"/></td>
<td><s:text name = "body4"/></td>
<td><s:text name = "body5"/></td>
</tr>
</table>
</s:i18n>
1. But finally I have to implement the possibility of changing
language manually by means of href (ru | eng). What is the best way to
do it?
2. Could I anywhere set the default locale - I mean if someone
accesses my application from another locale I would want to set en_Us as
a default for this case.
Thanks a lot!
Best regards.