QuestionQ29
VerifiedWorking with Databases and EAVAn Adobe Commerce developer works on a Magento 2 instance containing B2C and B2B websites, each with three store views for English-, Welsh-, and French-language users. The developer must add a link between the B2C and B2B websites through a generic link template used throughout the sites, but wants those links to appear in English regardless of the store view.
The developer creates a custom block for this template and, before rendering, sets the translation locale and starts environment emulation with the following code:

The template text is nevertheless translated into each store’s language. Why does this happen?
Community Discussion