Internationalization in Liferay 6.2 Alloy UI

1.9k Views Asked by At

we are developing a site in which we have to use internationalization concept for describing the web in different languages(18). I already translate my labels of text box and etc but I am fail to translate the label of buttons and also we have one navigation bar in which seven different pages links are present. How to change this navigation links.enter image description here

Here how to translate these into different languages. I am using Liferay 6.2 Alloy UI. Thanks and regards asif aftab

1

There are 1 best solutions below

1
On

Liferay provides a built in internationalization integration with Alloy UI.So for Internationalization in <aui> tag you simply have to do :

<aui:input name="helloWorld" value="anyThing"/>

And it automatically internationalize name field of <aui> tag converting it as Hello World <label>.And if you want to provide custom for tag you need to use

<aui:input name="helloWorld" value="anyThing" label="edit-button"/>

and define edit-button in Language.properties.

However for normal <html> tag this method doesn't work.And I assume that your are using <a> tag for your navigation. For providing internationalization in such tag liferay has provided a method.

<liferay-ui:message key="title-home-navigation"/>

and define the key in Language.properties.

So you could use it like :

<h1><liferay-ui:message key="title-manage-organization"/></h1>
<a href="${homeButton}" ><liferay-ui:message key="title-home-navigation"/></a>

for achieving internationalization feature in such tags.

I hope this help your cause.