0

I've followed this tutorial to support internationalization in my JSF web application. I have now a page that should have its own language, independent from the other pages language. The problem is that changing the locale from this page changes also the locale of the others pages (and the other way around):

FacesContext.getCurrentInstance().getViewRoot().setLocale((Locale)entry.getValue());

How can I manage multiple Locale settings?

ezy
  • 59
  • 1
  • 9
  • 25

1 Answers1

1

You need to check desired Locale every time you open a new page and change it before page has been rendered. You can achieve it by using <f:event type="preRenderView" ...> look at this question for details: Initializng a Backing Bean With Parameters on Page Load with JSF 2.0

Community
  • 1
  • 1
Anatoly
  • 5,056
  • 9
  • 62
  • 136