I wish to check whether we can restrict the supported languages listed in the language portlet based on the user organization or group.
We have a page with the language portlet which is configured with the languages "English", "French", "German" etc
We have users:
German users
Other users
Can we achieve this with native Liferay or do we need to use a hook to achieve it?
As the language portlet uses the portlet preferences to store the selected languages (see /html/portlet/language/init.jsp
) and that portlet declares preferences-owned-by-group
(see /WEB-INF/liferay-portlet.xml
) it means that all users see the same list of languages.
If you want to change that you will either have to write a hook (make the necessary modifications in /html/portlet/language/init-ext.jsp
then), create your own portlet, or you implement that feature in your theme. The later is a common scenario anyway, if the demanded designs don't match the ones provided by the language portlet.