Friday, May 21, 2010

Liferay: How to switch language

To localize the language, we configured in
The properties for language is set as shown below.

#limit the language selection.

I need to create a bilanguage portal. For instance at least a user can choose either to read English or Bahasa or France.
The only file that control language properties is For additional terms, we can use and In liferay Community Edition, we can put these files ( and in ~/tomcat-6.0.18/webapps/ROOT/WEB-INF/classes/content.
The extend properties depends on languages to be used in portal.

Every places in portal need to be switched will functions as the follows.
1. Journal content will be written using FCK Editor.
2. Theme (template & layout), portlet can be configured in files. In my example, xx_YY are en_US and ms_MY.

For the second part above, language's switch identifier generally in this form; #language("any_term_to_change"). Let say we need to apply this to banner. So we write #language("portal.banner"). Then we translate banner term in Language-ext_xx_YY files.