Minsky_ae Posted August 10, 2020 Share Posted August 10, 2020 (edited) Hi, I created a specific theme for PS in mails > themes and I would like to add a sentence in the components > footer.html.twig In Classic theme I saw this code: {{ '<a href="{shop_url}">{shop_name}</a> powered by <a href="{prestashop_url}">PrestaShop™</a>'|trans({'{prestashop_url}': 'https://www.prestashop.com/?utm_source=marchandprestashop&utm_medium=e-mail=utm_campaign=footer_1-7'}, 'Emails.Body', locale)|raw }} So I tried to use trans() like this: {{ 'My sentence'|trans({}, 'Emails.Body', locale)|raw }} But I've got no clue where I'm supposed to translate it now! I looked in back-office translations but couldn't find it anywhere. Some help will really be appreciated! Edited August 14, 2020 by Minsky_ae (see edit history) Link to comment Share on other sites More sharing options...
Minsky_ae Posted August 14, 2020 Author Share Posted August 14, 2020 I found help by asking on Stack Over Flow 😐 : https://stackoverflow.com/questions/63371581/prestashop-translation-in-email-theme/63375857#63375857 I added a row in the YOURPREFIX_translation table with those value: - id_lang: 1 - key: My English sentence - translation: My translanted sentence - domain: EmailsBody - theme: mytheme 1 Link to comment Share on other sites More sharing options...
Odjavel Posted March 26, 2021 Share Posted March 26, 2021 (edited) Le 14/08/2020 à 8:49 AM, Minsky_ae a dit : I found help by asking on Stack Over Flow 😐 : https://stackoverflow.com/questions/63371581/prestashop-translation-in-email-theme/63375857#63375857 I added a row in the YOURPREFIX_translation table with those value: - id_lang: 1 - key: My English sentence - translation: My translanted sentence - domain: EmailsBody - theme: mytheme Hello, The post is a bit old, but you just saved my day !! I could finally solve the problem of translating subjects of emails from ps_emailalerts modules, which doesn't even bother itself to create those lines in ps_translation table, or at least an easy way to do it ouserlves. It is also just incredible that the Translations page of Back Office doesn't allow to do that easily. Noooo... You have to hit directly into the database to make a such a dummy thing. Thanks again ! Edited March 26, 2021 by Odjavel (see edit history) 1 Link to comment Share on other sites More sharing options...
Recommended Posts
Create an account or sign in to comment
You need to be a member in order to leave a comment
Create an account
Sign up for a new account in our community. It's easy!
Register a new accountSign in
Already have an account? Sign in here.
Sign In Now