<jstranslator> <foo-unique-id translate="message" module="foo_bar"> <message>Foo</message> </foo-unique-id> <bar-unique-id translate="message" module="foo_bar"> <message>Bar</message> </bar-unique-id> </jstranslator>
-You can add translation strings for both admin and frondend
After this you can add and use translations in CSV files like always:
"Foo","Le Foo" "Bar","Le Bar"
-For example here is French translation: app/locale/frFR/FooBar.xml
And later just use
Translator.translate('Some string') to get appropriate translated string.
-just to make things clearer
You can still translate JavasSript strings without inline coding(except code for translating) in older versions of Magento, just you need to use Translator object:
Note: If you are getting ’Translator is not defined’ error. Check if you have the var Translator in your HTML source code. If not please add following line in template/page/html/head.phtml file:
<?php echo $this->helper('core/js')->getTranslatorScript(); ?>