cancel
Showing results for 
Search instead for 
Did you mean: 

Change locale with the API (no change visible)

sebastien_marin
Champ in-the-making
Champ in-the-making
Hello, i am making an automatic login of my userprincipal in the Alfresco portlet in a Liferay portal. So the connection is ok but the problem is that i can not find where to change the locale to apply the userprincipal locale.

I change the locale in the I18N class, in the portletsession and in the facesContext with the Application class. So when i display the I18N locale when i use alfresco, it has change… but the display is always in fresh and not as the locale in the I18N.


So where to change the local with the API and when ? (facesRender, processAction?…)


Thank you, it is urgent… lol
1 REPLY 1

kevinr
Star Contributor
Star Contributor
We perform the set during the facesRender() and processAction() methods:

// Set the current locale
I18NUtil.setLocale(Application.getLanguage(request.getPortletSession()));

Cheers,

Kevin