Page 1 of 1

PrestaShop 1.5.4.1 - mail template translation issue

PostPosted: Fri May 10, 2013 3:33 am
by shokinro
What is the problem?

If you are using PrestaShop 1.5.4.1 (latest version at time of this post), and you try to translate email templates using the back office translation function:

- back office --> Localization --> Translations --> choose "Email template translations"

When you enter the translation contents or subject translation, and you click "Save", you may find nothing has been saved.

And, you will see following error message:

Cannot write language file for email subjects. Path is: /public_html/themes/default/mails/en/lang.php


If you turn on development mode by setting "set _PS_DEV_MODE_" to true, and try the same operation again, you will see errors similar to the following:

Warning: file_put_contents(/public_html/themes/default/mails/si/account.html) [function.file-put-contents]: failed to open stream: No such file or directory in /public_html/controllers/admin/AdminTranslationsController.php on line 1457

Warning: file_put_contents(/public_html/themes/default/mails/si/backoffice_order.html) [function.file-put-contents]: failed to open stream: No such file or directory in /public_html/controllers/admin/AdminTranslationsController.php on line 1457

.......



The Cause
============
Apparently PrestaShop is changing the folder structure for the mail folder, from /mails/ to /themes/default/mails/

However, this change it not yet finished. Some pages are using the new structure, but others are still using the old structure and actual files are still remaining in the /mails/ folder.

Solutions
==============

Solution 1:
You can choose to translate the files by opening the email template files directly, and write the translations directly to the files.
For mail subject translations you can change the following file

/YourStoreRoot/mails/xx/lang.php

where xx is iso code of the language you want to translate. (es for Spanish, fr for French,....)

Solution 2:
Here we introduce a workaround if you still want to use back office translation tool.

A. Copy all mail files to the location the translation tool is looking in.

From
YourStoreRoot/mails/

To
YourStoreRoot/themes/YourTheme/mails/


B. Perform the translations from the back office as usual.

C. After finishing the translations, copy all email files back to their original location.

--------

Hope this helps...

Re: PrestaShop 1.5.4.1 - mail template translation issue

PostPosted: Fri Feb 07, 2014 4:11 am
by darwinco_1695
Hi!

Regarding to this post:

1. My solution: I am using PrestaShop 1.5.4.1, I can translate my email templates using the back office translation function:

- back office --> Localization --> Translations --> choose "Email template translations" --> choose "core (no theme selected)"

In the second drop list, instead of "default" you choose "core (no theme selected)"

2. My problem: "email subject" doesn't appear, the only problem is in "subjects", they are not either in lang.php file

Emails for agilemultipleseller module http://standsbogota.com/1.jpg

Emails for other modules http://standsbogota.com/2.jpg

How can I translate my "mail subjects" for agilemultipleseller module 2.1.5.? (i.e. Your seller account approved!)‏

Appreciate your help and comments, thanks.

Regards

Re: PrestaShop 1.5.4.1 - mail template translation issue

PostPosted: Wed Feb 12, 2014 6:12 am
by shokinro
Thanks for using our modules.
For mail subject, because there was bug in some version of PrestaShop mail subject translation, it does not work properly.
so we changed to not use normal text translation instead of mail subject translation. Please try to find the text "New Order" and translate it for new order email subject in agile multiple seller module translation.