halpdoge
halpdoge

Reputation: 712

How to localize ADTs Liferay 7

We are using ADTs for our Liferay 7 project. The ADTs have to support at least two languages. We created our own portlet and I discovered that you can use <@liferay_ui["message"] key="…" />. However, that utilizes the global language file in Liferay.

My question is, how do I achieve looking into my portlet's language file? Do I have to use JSPs for that?

Upvotes: 1

Views: 502

Answers (1)

JMF
JMF

Reputation: 1113

The most advisable thing is to create for example, a "core-hook" where you have all the available languages with their respective files and their translations. It is more organized than having languages at the portlet level.

I've given you an example with gradle that in the end is the same using the technology you use

Example: https://github.com/liferay/liferay-blade-samples/tree/master/gradle/overrides/resource-bundle-override

${languageUtil.get(locale, "add-blog-entry", "Add Blog")}

Upvotes: 1

Related Questions