Forums de discussion

localization in liferay

Rajesh S, modifié il y a 14 années.

localization in liferay

New Member Publications: 12 Date d'inscription: 13/02/09 Publications récentes
please anyone help me

how localization works in liferay?"

Thanks in Advance..

Regards ,
Rajesh S
thumbnail
Jeffrey Handa, modifié il y a 14 années.

RE: localization in liferay

Liferay Master Publications: 541 Date d'inscription: 01/12/08 Publications récentes
Hi Rajesh,

The message keys and the English values can be found in the Language.properties file found in the portal/portal-impl/src/content directory. In that same directory are the localized versions of that file (e.g. Language_es.properties, Language_ru.properties, etc.). In files, such as the jsp page that represents the create account screen, you'll find tags from the Liferay tablig such as the following:

<liferay-ui:message key="password" />

In this case, the localized value of the message assocated with the password key will be displayed.

In older version of Liferay, you could provide your own messages to existing keys, as well as adding new keys through the Language-ext.properties file located in the ext/ext-impl/src/content directory. Starting in Liferay 5.1, you can also use Hook Plugins to override localized messages.

For your own custom portlets, it may depend on the framework you're using. If you're using straight JSP's, then you can add the following entry to your portal.xml file (after the </supports> tag).

<resource-bundle>content.Language</resource-bundle>

Create the content directory in the src folder of your portlet and create a Languge.properties file in that directory. Add your keys and messages to this file and any other localized language files.
Rajesh S, modifié il y a 14 années.

RE: localization in liferay

New Member Publications: 12 Date d'inscription: 13/02/09 Publications récentes
hi Jeffrey,

thanks for the reply.

Regards ,
Rajesh S