Translating Javascript Strings

Use this syntax:

Translator.translate('Some phrase');

I believe you also have to make the translation available to the Translate class in this manner:

<script type="text/javascript">
Translator.add('You should take care of this confirmation message!','<?php echo Mage::helper('yourmodule')->__('You should take care of this confirmation message!')?>');
</script>

Mike Whitby Over 11 years ago