cancel
Showing results for 
Search instead for 
Did you mean: 

Different locale appear on one page

smilehahohi
Champ in-the-making
Champ in-the-making
Hi all,

I have made some customization to allow the user to choose locale when they logon the alfresco share(use a localResolver java class to set the I18NUtil.setLocal()), it works, but with some issue…

If I choose English local, after logon, most of the page will display English, while the site activity dashlet display different locale(zh_CN, my browser is defualt zh_CN).

I have checked the activity-list.get.html.ftl, which is used to retrieve the activities in an ajax request, it alwasy pick up the zh_CN locale, the ${locale} variable is zh_CN in this template, so, I wish to debug the ${msg()} method in this freemarker template. The question is coming: what is this "msg" method? A freemarker method or a javascript function? If it is freemarker method, what is the underline java class to implement this method? I'm a fressman to freemarker, please help me!

Another question is anybody have any idea about why it will display different locale in one page? I believe the final language handler is I18NUtil.getMessage(), the locale is stored in the current thread, why different web script on the same page will retrieve different locale? Is that mean different web script is executed by differnt threads?

Thanks!
1 REPLY 1

mitpatoliya
Star Collaborator
Star Collaborator