Question

I need to translate the text <a href="">Share the love !</a>. I have added the text in theme's translate.csv file like this "Share the love !","Partagez votre Passion !", but the text not translated in footer(app/locale/en_US/template/email/html/footer.html).I have translated the text by creating footer template for each store view. Is any other way there to translate the text?

Was it helpful?

Solution

If you are referring to email template then you can translate it by adding translation in transactional emails.

Go to System->Transactional Emails then click "Add New Template" at the top right then choose the footer template and language then modify according to your style and then save it.

enter image description here

Or if it is in the template like in footer.phtml the you should wrap it with "$this->__('translatable text')" or in your case <?php echo $this->__('Share the love !'); ?> and your translation will work from that translate.csv file.

Hope that it helps.

OTHER TIPS

You can use the Magento CSV translations files in order to translate only dynamic content in your emails. For example, order_new.html which is the order confirmation email template contains (for every language) {{layout handle="sales_email_order_items" order=$order}}, which is pointing to the items.phtml (and retrieving all the order items in your email). The text here is translated based on the CSV files using the __ function.

However, in your case, it's a statictext which needs to be translated so the CSV approach will not help you. By copying the footer.html in every corresponding locale and translating it (like you actually did), is the correct approach here.

I hope it helps!

Licensed under: CC-BY-SA with attribution
Not affiliated with magento.stackexchange
scroll top