Method 1: Direct Translation: In this method you can use the defalt Magento translation function to perform the translations. For example in your .phtml you can write the following code:
Before that you have to add the string in Translator as follows:
You have to add this new string in the translation csv file of your module. See how to add translation csv in your module.
<jstranslator> <my_string translate="message" module="mymodule"> <message>I have been translated.</message> </my_string> <my_another_string translate="message" module="mymodule"> <message>I want to be translated.</message> </my_another_string> </jstranslator>
Now in your template or JS file you can use: