Greetings,

I am working on a Struts application supporting several locales which
MessageResource files are :

### en (and default)
# Labels
label.accessnumber=Access Number
label.pinnumber=Pin Number
# Error messages
global.error.invalidlogin=<li>Invalid Access Number and/or Pin</li>
global.error.login.requiredfield=<li>The {0} is required for login</li>

and

### fr
# Labels
label.accessnumber=Numéro de Compte
label.pinnumber=Code Secret
# Error messages
global.error.invalidlogin=<li>Numéro de compte ou code secret incorrect</li>
global.error.login.requiredfield=<li>Le champ {0} ne doit pas être vide</li>

--------------------------------------------------------------------------

In my LoginForm validate method, my code is

    MessageResources resources = (MessageResources) request.getAttribute(
Globals.MESSAGES_KEY );

    if (getAccessNumber() == null || getAccessNumber().length() < 1)
    {
      errors.add(ActionErrors.GLOBAL_ERROR, new
ActionError("global.error.login.requiredfield",
          resources.getMessage("label.accessnumber")));
    }

---------------------------------------------------------------------------
My problem is that when I do not provide an access number using a
french Internet Explorer, I get the following error message:
"Le champ Access Number ne doit pas être vide"

=> The text of the Action Error is in the correct locale
but
=> The MessageResources retrieved from the request is the Default locale !!!

Any idea on how I can solve this ?

-- Cédric

---------------------------------------------------------------------
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]

Reply via email to