0

I have mapped <message-bundle> in faces-config and my messages are loaded (I can load them with https://stackoverflow.com/a/6272972/2037762 ) By definition https://javaserverfaces.java.net/nonav/docs/2.2/javadocs/index.html if I insert faces message into context then it should be translated.

I returned message in validator

        FacesMessage msg =
                new FacesMessage("message_email_wrongFormat");
        msg.setSeverity(FacesMessage.SEVERITY_ERROR);
        throw new ValidatorException(msg);

but it doesn't localize.

Using primefaces 5, JSF2.2

Community
  • 1
  • 1
Flowy
  • 420
  • 1
  • 5
  • 15
  • yeah I had, thanks. I looked at source codes in javax.faces and it looks like even authors don't use the translation on view layer ... maybe I just misunderstood something – Flowy Oct 15 '14 at 19:41
  • 1
    Where are you setting the Locale ? any related code ? You need somehow to update the ViewRoot's Locale. –  Oct 19 '14 at 07:04

0 Answers0