If your portlets target an international audience, you can localize your portlets’ user interfaces. To localize a portlet, you need to create language properties files, also called resource bundles, for each language you wish to support. You can translate language properties manually or use a web service to translate them for you. Conveniently, all of the translated messages used by Liferay Portal are also accessible to plugin projects. To localize messages in addition to portal’s localized messages, you must create language keys in one or more resource bundles within your plugin project. When planning your portlet’s localization, you should consider the following questions.

Are there messages that Portal uses that you’d like to use in your portlets? Does your plugin contain multiple portlets? If so, do any of its portlets need to be available for administrative purposes in the Control Panel? If any of its portlets need to be in the Control Panel, you should create separate resource bundles for each of these portlets. Otherwise, your portlets should share the same resource bundle so that you can leverage Liferay’s language building capabilities from Liferay IDE and the Plugins SDK. You’ll learn how to localize your portlets in all of these scenarios.

Related Topics

Localizing JSF Portlets

Using Liferay’s Language Keys

Liferay specifies a host of language keys in its core Language.properties file. This file can be found in two different places. If you want to extract it from an existing runtime, you can find it...

Read More

Generating Language Properties File and Automated Translations

In this tutorial, you’ll learn how Liferay facilitates generating language key files and translating the keys to languages you want to support. In order for a user to see a message in his own...

Read More

Localizing Site Administration Portlets

Your plugin project may have Site Administration portlets that are missing super-fancy, must-have titles and descriptions that other admin portlets have. Or if you’ve already provided titles and...

Read More

Sharing Language Keys Between Your Portlets

It’s likely that you’ll have messages that you want to localize that aren’t already implemented in one of Liferay’s core language keys. You’ll need to specify these language keys in one or more...

Read More
0 (0 Votes)
Faceted Search and Customized Search Filtering Previous