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?
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?
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
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.