Fórum

Language translation

thumbnail
Sujay Kumar Paul, modificado 10 Anos atrás.

Language translation

Regular Member Postagens: 164 Data de Entrada: 28/10/11 Postagens Recentes
Hi,
I am fetching a list of message from data base in English.
Now I want to translate those message in different language like Hindi etc.
I have put those messages in Language-ext_hi.properties file.
In jsp i have wrote the code
<s:iterator value="documentList" var="rowstatus" status="stat" >
<tr>
<td>
<liferay-ui:message key='<s:property value="Message" />'/>
</td>
</tr>
</s:iterator>

But its not working.Please help.
Thanks in advance.
thumbnail
Anil Sunkari, modificado 10 Anos atrás.

RE: Language translation

Expert Postagens: 427 Data de Entrada: 12/08/09 Postagens Recentes
Hi Sujay,

Firstly how you are trying to achieve this....have you put the props file under src/content.
& under the below tag... in key attribute just give the key which you have put inside the props file
<liferay-ui:message key='xxx.xxx'/>

Secondly if Hindi Language Context really loading or not...either you can check by passing '/hi' after your port or before /web or /private

Regards,
Anil Sunkari
thumbnail
Sujay Kumar Paul, modificado 10 Anos atrás.

RE: Language translation

Regular Member Postagens: 164 Data de Entrada: 28/10/11 Postagens Recentes
Dear Anil,

Thanks for reply.

The tag <liferay-ui:message key='xxx.xxx'/> is working here

But if i put this key value <s:property value="Message" /> then its showing blank.

But <s:property value="Message" /> this tag alone is also showing message.

I think this 2 tag is not working together.

Please help.
thumbnail
Anil Sunkari, modificado 10 Anos atrás.

RE: Language translation

Expert Postagens: 427 Data de Entrada: 12/08/09 Postagens Recentes
Why do you want to user <s:property > tag inside again....Any specific reason??
thumbnail
Sujay Kumar Paul, modificado 10 Anos atrás.

RE: Language translation

Regular Member Postagens: 164 Data de Entrada: 28/10/11 Postagens Recentes
I am fetching a list of message from data base in English.
Now I want to translate those message in different language like Hindi etc.

Is there any other option for this?