1

I've added a few items to the registration portal. Now I want to label them for the specific language. Liferay like.

in liferay hook :

<hook>
     <language-properties>content/Language_en.properties</language-properties>
     <language-properties>content/Language_fa.properties</language-properties>
</hook>

and in Language_en.properties :

 educationType= Education Type
 mobileNumber =Mobile Number

and in Language_fa.properties :

 educationType= persian education type 
 mobileNumber = persian  Mobile Number.

and craete_account.jsp

  <aui:input name="educationType" type="text"></aui:input>
  <aui:input label="Mobile Number" name="mobileNumber" type="tel"> </aui:input>

now, which way should i use to label these 2 items

ontashkal
  • 168
  • 1
  • 16
  • Are you developing a custom plugin? or using a liferay plugin? can you also tell us about the Liferay version you are using? – Prakash K Jan 07 '15 at 05:56

2 Answers2

2

Follow this link to create Language.properties hook:

http://proliferay.com/liferay-language-properties-hook-development/

ASR
  • 3,289
  • 3
  • 37
  • 65
1

First, import the ui taglib at the top of your page like this:

<%@ taglib uri="http://liferay.com/tld/ui" prefix="liferay-ui" %>

Then use the ui:message tag to render the appropriate label, passing in the correct key for that label, like this:

<liferay-ui:message key="educationType" />
clav
  • 4,221
  • 30
  • 43