samedi 2 juillet 2016

How to get value of key from properties file javaScript


I have some javascripts in my html code, I want to get the strings form my language.properties file; Here is my language.properties file:

not_yet= you cant do this.
key=key

This is my javascript code:

var not= you cant do this.

How can I do it?

For example in my html I did somthing like this:

<fmt:setBundle basename="language"  />
    <th><label style="float:right;"><fmt:message key="key" /></label></th>

I saw some sulotion to do that in javaScript code but it's not working for me:

var someJSValue = '${language.key}';    

Thank you!


Aucun commentaire:

Enregistrer un commentaire