Liferay provides us with fine grained built-in localization features. In Liferay Portal one can apply localization on per user basis. But how to apply default locale to a Community, Liferay doesn’t provide any such functionality but it can be implemented using Portal Properties Hook.
So case is, portal instance have more than one Community and we need to apply a default language setting for one Community that is different from other Communities. To achieve this implement an Event Hook for servlet.service.events.pre.
Following is the step by step description to achieve this functionality-
1. Create a portal properties hook and choose the servlet.service.events.pre Event
2. Create a new class say SampleClass by extending the com.liferay.portal.kernel.events.Action
3. Now en_US locale will be applied to LONG_GROUP_ID Community.
Any queries or comments.........
So case is, portal instance have more than one Community and we need to apply a default language setting for one Community that is different from other Communities. To achieve this implement an Event Hook for servlet.service.events.pre.
Following is the step by step description to achieve this functionality-
1. Create a portal properties hook and choose the servlet.service.events.pre Event
2. Create a new class say SampleClass by extending the com.liferay.portal.kernel.events.Action
3. Now en_US locale will be applied to LONG_GROUP_ID Community.
Any queries or comments.........
That's useful.
ReplyDeleteDo you know how to redirect a user after login to a specific community based on his mail domain?
user@microloft.com - Is redirected to Microlot comunity
user@redapple.com - Is redirected to Red Apple comunity
Than you!