views:

331

answers:

1

I've got forms that I display on almost every pages of a website (a login form, for example), so I don't use an action for those. The "post" of those forms just goes to an action and if there is a validation error, it displays another "central" page. The only thing that doesn't seems to work in the form page is displaying a message in different languages using the tag <s:text>

It always use the default locale defined in struts.properties. I guess it's because I don't call any action before displaying the form.

Anyway, I have 2 files : struts_fr.properties and struts_en.properties

In struts.properties I have

struts.locale = fr_CA

And I use something like :

<s:text name="login.label.username" />

The message displayed is always the one from the "struts_fr.properties".

The question is : How can I set the locale for struts, before using the s:text tag, when there is no action called?

A: 

Well it seems that it worked "alone" after a while... maybe the work directory was in cause here. We also have some custom interceptor so maybe that's why it worked.