Skip to content

Instantly share code, notes, and snippets.

@bekapod
Created October 25, 2013 09:21
Show Gist options
  • Save bekapod/7151977 to your computer and use it in GitHub Desktop.
Save bekapod/7151977 to your computer and use it in GitHub Desktop.
MAGENTO: Translating text in JS File
<!-- AFTER getTranslateScript(); -->
<script>
Translator.add( 'Text to translate', '<?php echo $this->__( 'Text to translate' ); ?>' );
</script>
Translator.translate( 'Text to translate' );
Text to translate Translated text
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment