4 Replies Latest reply on Feb 28, 2007 8:30 PM by Tony Mai

    Changing Locale in Seam?

    Tony Mai Apprentice

      I have the following code

      public class LocalChanger {
       public String englishAction() {
       FacesContext context = FacesContext.getCurrentInstance();
       context.getViewRoot().setLocale(Locale.ENGLISH);
       return NavigationRuleNames.DISPLAY_SAME_PAGE;
       }
      
       public String otherLangAction() {
       ....
       }
      


      Yet some how when I navigate around, the locale is being set back to the default Locale.

      Is there a better way to do it with Seam?

      Thanks