Hi,
We can’t make the switch language block working on page_not_found, login, forgot password etc, basically everything that comes from a native concrete page.
For example, my local is in french, but when I go to the login page, the page content switch to english.
Or if I switch the language directly from the login page from english to french, the page content stays in english, but the selected element on the select tag of the switch language block is “FR”.
The problem is not always consistent, usually the first time it works, after it seems to kinda randomly select a language, seems to be a cache problem ? (We did clean everything though)
Resetting manually the local with:
$localization = app(\Concrete\Core\Localization::class);
$localization->setLocale($local); // fr_FR, en_GB etc
Solves the problem for the page content language but not on the selected element of the switch language block.
Plus we don’t always have a way of getting the local of the page as the method to retrieves the local from the Localization class also returns a wrong local.
Any solutions ? Are the switch language block not supposed to be used on those kind of page ? Or are we not supposed to have those pages be multilingual to begin with ? Is it a bug ?