Thursday 1 September 2016

Adding Translations in Magento JavaScript.


Some time you require to add translation through Javascript and you don't have any option to add it via your template.  Below is the code for do it.

<script type="text/javascript">
Translator.add('Your translation.','<?php echo Mage::helper('yourmodule')->__('Your translation.')?>');
</script>

Please leave your comments, if you find this post is useful.

No comments:

Post a Comment