2 Replies Latest reply on Jun 3, 2008 10:21 AM by je le

    Forcing locale

    Jean Vence Newbie

      Is there anyway to force a specific locale to load when a user first enters the portal. Something like http://localhost:8080/portal?locale=fr would force the French locale to be used.

      Also, is there anyway to dynamically change the locale by setting some variable so that the user does not have to go in his profile to specify the locale . For example; the way this would work is that we would have an entry page with flags, when the user click on a specific country flag, the locale is set automatically for that user.

      Many thanks,


        • 1. Re: Forcing locale
          je le Newbie

          I'm pushing this "old" thread back on top because i'm having the same problem.

          I would like to offer users the posibility to choose language not only throw brower language setting (request.getLocale() ) but also throw an interface (js/jsp etc...)
          For my datas, I can walk around with session. The problem is jbossportal (window, menu, etc..).

          how could i inform jossportal to use a locale for a specific session (anomymous ) ???
          Is there a servlet/filter/even listener I could use ??? mbean ?


          • 2. Re: Forcing locale
            je le Newbie

            I managed to inject/force a custorm local by adding a new mbean (ServerInterceptor) into JBossInterceptorStackFactory (jboss-service.xml)

            My problem now is i'm unable to retrive any session attribure passed from a servlet into the HttpSession. On the servlet side, no pb, can read attribute back.
            The only solution I found is to use PortalSession... with portlet. i strongly prefer servlet :-)

            I tried also from a jsp/scriptlet into portal-core without success.
            What I set into those servlets is valid, but cannot been read back from the interceptor.

            Any clue ???

            Doesn't look to be an issue but just in case, my jboss-service.xml changes :

             <depends-list optional-attribute-name="InterceptorNames">