Tuesday, December 4, 2012

Liferay: beta languages

If you have used the internationalization built in in Liferay, you might have noticed if you hover over the flags, the name of the languages appears. You also might have noticed, the name indicates the language is 'in beta'. If you want to get rid of this, you can write a hook (or extend a hook you already have).

Of course, you need to know what page you have to adjust. The display of the language-portlet is located in $LIFERAY_HOME$/tomcat-version/webapps/ROOT/html/taglib/ui/language/page.jsp. Copy the page in your hook, and somewhere near the bottom, you'll find following code:

if (LanguageUtil.isBetaLocale(locales[i])) 
{
    message = message + " - Beta";
}

Remove it, and the beta indication is gone!

2 comments: