• Post Reply
  • Bookmark Topic Watch Topic
  • New Topic

JSF and internationalization

 
bada Bos
Greenhorn
Posts: 2
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator

Hello evry body,
to change the local of my web application i've done the code below :


public void processChangeLocal(ValueChangeEvent event){
Locale newLocal = new Locale( (String)event.getNewValue());
FacesContext context = FacesContext.getCurrentInstance();
context.getViewRoot().setLocale(newLocal);
context.getApplication().setDefaultLocale(newLocal);
}

This method is called when the user changes the language. By my problem is only the local of the currente page changes.

i've done this in the faces-config :

<locale-config>
<default-locale>fr</default-locale>
<supported-locale>fr</supported-locale>
<supported-locale>en</supported-locale>
</locale-config>
 
Aravind M Jay
Greenhorn
Posts: 15
 
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic