Note that there are some explanatory texts on larger screens.

plurals
  1. POUsing jquery i18n plugin for i18n?
    primarykey
    data
    text
    <p>I am using jquery i18n plugin ( <a href="http://code.google.com/p/jquery-i18n-properties/" rel="nofollow noreferrer">http://code.google.com/p/jquery-i18n-properties/</a> ) to internationalize the messages placed in jquery/js. i have below project structure.</p> <p><img src="https://i.stack.imgur.com/clBZ7.png" alt="enter image description here"></p> <p>I have <code>some.js</code> file in <code>js</code> folder and inside <code>some.js</code> file i have to refer a properties file which is located in <code>properties</code> folder of <code>src/main/resources</code> folder. can i do as below? inside <code>properties</code> folder of <code>src/main/resources</code> folder i have placed <code>Messages.properties</code> and <code>Messages_en_US.properties</code>. In both the properties files i have placed <code>myForm.success.msg=Success</code> property. Now i am trying to access it as below. But below code does not get the value of <code>myForm.success.msg</code> key. <code>instead of giving value, it is giving the key itself but not the value</code>. Am i referring the properties file wrongly? is my properties file referring correct? Please help me.</p> <h2>JSP code:</h2> <pre><code> &lt;script type="text/javascript" src="./public/js/some.js"&gt;&lt;/script&gt; &lt;script type="text/javascript" src="./public/js/jquery.i18n.properties-min-1.0.9.js"&gt;&lt;/script&gt; </code></pre> <h2>some.js</h2> <pre><code>jQuery.i18n.properties({ name:'Messages', path:'properties/', //as i have properties file in properties folder of src/main/resources mode:'both', callback: function() { alert("message "+jQuery.i18n.prop('myForm.success.msg')); } }); </code></pre>
    singulars
    1. This table or related slice is empty.
    1. This table or related slice is empty.
    plurals
    1. This table or related slice is empty.
    1. This table or related slice is empty.
    1. This table or related slice is empty.
    1. This table or related slice is empty.
    1. This table or related slice is empty.
 

Querying!

 
Guidance

SQuiL has stopped working due to an internal error.

If you are curious you may find further information in the browser console, which is accessible through the devtools (F12).

Reload