Вы можете сделать это в файле шаблона yourfile.phtml. Javascript-скрипт js / mage / translate.js должен быть включен в ваш HTML-заголовок (Magento делает это по умолчанию).
<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>
EDIT :
С Magento 1.7 вы можете добавить файл jstranslator.xml в ваш модуль в папке etc / и установить следующую строку следующим образом:
<jstranslator>
<!-- validation.js -->
<validate-no-html-tags translate="message" module="core">
<message>HTML tags are not allowed</message>
</validate-no-html-tags>
<validate-select translate="message" module="core">
<message>Please select an option.</message>
</validate-select>
</jstranslator>
Затем переведите строку, как вы делаете это для PHP, благодаря CSV-файлу.
Это добавит перевод в код JavaScript, как показано ниже: var Translator = new Translate(...)