1

I want to change some styles and translation in: the body, the name that appear in "name from" of the inbox and subject of the mails of Magento is sending.
Where are need to make the changes?

I'm using Magento2 and i looked in this path:

\app\design\frontend\{nameTheme}\{nameTheme}\i18n\

And found a .cvs file with some translation, but none of them have the sentences i'm looking for.

  • Is it okey if i add the sentence I want to translate in the file that i found in the path?
  • Where else i need to check?
  • The .cvs file can store the translation of the subject and the name from that you see in your inbox?

If anyone can explain me where Magento 2 took the translation for the mails and the templates to build the email and sent it, it will me awesome!!!

Note: all the sentence of the templates were written like this: {{trans "View past orders"}}. So the content of the mails are dynamic.

Thank you very much!!!

1

3 Answers 3

1

The problem is that the Phrase class sometimes has only a Placeholder renderer that returns only keys, not their translations. To solve this problem you can try to reload in \Magento\Framework\App\Area the translate part $area->load(\Magento\Framework\App\AreaInterface::PART_TRANSLATE) or set CompositeRenderer to Phrase

\Magento\Framework\Phrase::setRenderer(
\Magento\Framework\App\ObjectManager::getInstance()
    ->get(\Magento\Framework\Phrase\RendererInterface::class));
0

Yes, of course.

Just add your language phrase and this will work.

\app\design\frontend{nameTheme}{nameTheme}\i18n\

Additionally you might need clear the cache:

php bin/magento cache:clean

7
  • I add the sentence, reset cache and the mails didn't change. =( any other idea? Jul 7, 2017 at 12:25
  • I reset the cache from the application, it have the same effect that run that command, right? Jul 7, 2017 at 12:27
  • Should be yes, but try clear cache from console, just in case. May be it solve the problem? Jul 7, 2017 at 12:58
  • Nop, it not solve the problem =( Jul 7, 2017 at 15:10
  • You sure that you changed correct email template? If change layout or remove translate sentence - this changes apllied correct? Jul 7, 2017 at 16:39
0

Please check for your questions ?

http://devdocs.magento.com/guides/v2.0/frontend-dev-guide/templates/template-email.html

1
  • I followed the steps of that link, and the mails didn't change. I create new templates using the base ones and add the sentences in the .cvs file reset cache from the application but the mails didn;t change the language. Any other idea? Jul 7, 2017 at 12:27

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge that you have read and understand our privacy policy and code of conduct.

Not the answer you're looking for? Browse other questions tagged or ask your own question.