Jump to content

Edit History

mavalentin

mavalentin


add screenshot

Hello, I have a custom email theme (derived from the "modern" theme), and I need to insert custom translatable text strings.
In the email layout twig files in /mails/themes/customtheme/core I am inserting the strings in this way

{{ 'Hi {customer_company_name},'|trans({}, 'Emails.Body', locale) }}

I would then need to be able to translate these strings in the shop languages by going in BO to Design -> Email theme -> Translate Emails.

Here I can though only see the strings that are in the default Prestashop email themes, the new ones are not showing up. Seems like there is an issue with the file scanner for the email folders, because when I insert custom strings in module templates, the file scanner retrieves them and they show up in the translation interface.

You can see in the attached screenshot that my string 'Hi {customer_company_name},' does not show up in the translation interface, but just the 'Hi {firstname}' is visible, which comes from the default email theme.

 

Does anyone know how I can do so that my custom strings show up in the translation interface?

I do not want to modify the HTML structure through the interface under International -> Translations, because I want to be able to regenarate the email layouts when changing the HTML structure in the twig files, without losing all my translations.

 

Thank you

immagine.png

mavalentin

mavalentin

Hello, I have a custom email theme (derived from the "modern" theme), and I need to insert custom translatable text strings.
In the email layout twig files in /mails/themes/customtheme/core I am inserting the strings in this way

{{ 'Hi {customer_company_name},'|trans({}, 'Emails.Body', locale) }}

I would then need to be able to translate these strings in the shop languages by going in BO to Design -> Email theme -> Translate Emails.

Here I can though only see the strings that are in the default Prestashop email themes, the new ones are not showing up. Seems like there is an issue with the file scanner for the email folders, because when I insert custom strings in module templates, the file scanner retrieves them and they show up in the translation interface.

 

Does anyone know how I can do so that my custom strings show up in the translation interface?

I do not want to modify the HTML structure through the interface under International -> Translations, because I want to be able to regenarate the email layouts when changing the HTML structure in the twig files, without losing all my translations.

 

Thank you

×
×
  • Create New...