Closed capitalfuse closed 1 year ago
Thank you! Likely is a regression from https://github.com/pimcore/demo/pull/435
I changed if condition like below.
if ($route && $routeParams['newstitle'] ) {
$routeParams['_locale'] = \Locale::getPrimaryLanguage($language);
$route = $this->urlGenerator->generate($route, $routeParams);
$target = $route;
}
---> But the above method has not been applied for the page view.
It only works for static routes at the moment
Fixed by #524
Expected behavior
ex) When change language from English to German on the main page; Links shows the following ---> 'https://demo.pimcore.com/?_locale=de' and not changed to the German site.
The following code has the main reason. src/Twig/Extension/LanguageSwitcherExtension.php
Actual behavior
It should be the following; 'https://demo.pimcore.com/de'
Steps to reproduce
Commented out the following codes, fixed, but it will affect the links of news document detail pages. src/Twig/Extension/LanguageSwitcherExtension.php