Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- <script>
- i18n_dict = {'how old':'Ich bin %s Jahre alt'};
- function test_i18n(){
- alert($.i18n._('how old','5');
- }
- </script>
- <a onclick="test_i18n()">clickme</a>
- <script type="text/javascript" src="../../../dojo/dojo.js"
- djConfig="isDebug: true, parseOnLoad: true, locale:'de'"></script>
- {name: 'Column 5', field: 'col5', formatter: dojo.number.format },
- <script type="text/javascript" src="jquery.i18n.properties-min.js"></script>
- <div class="i18n_label:foo">placeholder text</div>
- i18n_label:foo=bar
- $.i18n.properties({
- name: 'Messages',
- mode: 'map'
- });
- $('[class*="i18n_label:"]').each(function(index, elem) {
- $(elem.classList).each(function(index, classname) {
- if (!classname.match(/i18n_label:/))
- return;
- var newval = $.i18n.prop(classname);
- if (newval)
- $(elem).text(newval);
- });
- });
Add Comment
Please, Sign In to add comment