While indexing the content in multilanguage environment elasticsearch_helper_content submodule uses setConfigOverrideLanguage method of languageManager service. But apparently this is not enough. As it is using the rendered view of the entity that may use custom twig templates with translation filters it is necessary to change the language in more sophisticated way.

The attached patch is inspired by commerce module mail hander. I copied completely one method from it that is used to switching the language, when handling translatable twig templates.

Please review the patch.

Comments

a.dmitriiev created an issue. See original summary.

j-lee’s picture

After a quick view, the patch looks good to me.

j-lee’s picture

StatusFileSize
new5.75 KB

Reroll against latest dev