3

Magento 2 still sending cron emails in English.

I know in Magento 1.9 is a recognized bug, but I tried with the fixed known and it doesn't works.

I need to translate the product alert emails.

Any solution?

2 Answers 2

5

Ok, I just solved it thanks to @nobodypb https://github.com/magento/magento2/issues/3805#issuecomment-225160290

Just add the \Magento\Framework\App\AreaList dependency. And add this:

$areaObject = $this->_areaList->getArea(\Magento\Framework\App\Area::AREA_FRONTEND);
$areaObject->load(\Magento\Framework\App\Area::PART_TRANSLATE);

It works fine with my module! :D

0

I found better solution here to translate all sales async emails using a plugin: https://github.com/magento/magento2/issues/7426

It works perfect as expected.

Your Answer

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

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