Get Text from language properties via javascript


We know that we can get the text from the properties as


  Language.properties
   you-have-processed-sucessfully = Your Request processed successfully.

  JSP:
<liferay-ui: message key = "you-have-processed-sucessfully" />

CLASS:
LanguageUtil.get (pageContext, "you-have-processed-sucessfully");


But if want to retrieve via javascript , Here is the one

<script>

     <custom code> ---
              ----
   
Liferay.Language.get ( 'you-have-processed-sucessfully');

</script>


But this Liferay.Language will get from the Portal properties not from the portlet properties

There is way to solve this problem writing Hook and specifing the properties.




Comments

  1. MNC companies now looking for Selenium Testers, Hence here I like to share some the most trending area in software testing field, which is Selenium -- A Top trending automation testing tool. Learn more about Selenium here ==> Best Selenium Training Institute in Chennai
    FREE PDF download the course content ==>
    Selenium Training in Velachery

    ReplyDelete

Post a Comment

Popular posts from this blog

Theme display in javascript

How to know which liferay version we are using

Viewing the SQL Query in liferay : debugging the SQL Query in Hibernate