faces-config.xml
:
ru
If you can use CDI and deltaspike (JSF module) in your environment, you could add the following to your LocaleBean
to automatically reset the locale on the current view:
@javax.enterprise.context.SessionScoped
public class LocaleBean implements Serializable {
...
public void resetLocale(@Observes @BeforePhase(JsfPhaseId.RENDER_RESPONSE) PhaseEvent event) {
event.getFacesContext().getViewRoot().setLocale(this.locale);
}
}