Pages

Thursday 12 April 2012

Localization Specific Logo Image _ Liferay Portal

Localization Specific Logo Image _ Liferay Portal


Often there are requirements to show customized logo image according to portal’s current locale. In Liferay Portal there is no way achieve this but locale specific logo can applied by using the theme.

In theme, portal_normal.vm contains the following statement to display logo -

<a href=”$company_url” title=”#language(“go-to”) $company_name”>
<span>$company_name</span>
</a>

Here you can place check for the locale and accordingly change the logo image
-

<a href=”$company_url” title=”#language(“go-to”) $company_name”>
#if($locale == “en_US”)
<img src=”englishlogoimage” />
#else
<img src=”spanishlogoimage” />
#end
</a>

but now you can’t manage the logo from the community settings as image urls are hardcoded in the theme. To make it manageable you can use web content to render the logo image.

No comments:

Post a Comment