Problem
When enabled Content language detection (Determines the content language from a request parameter.) option, the language switcher links not working properly.
Steps to reproduce
Steps to reproduce
On a fresh D9 install:
- Enable 'Content translation' and language modules
- Add another language
- Under Detection and selection (/admin/config/regional/language/detection) configuration, enable 'Customize Content language detection to differ from Interface text language detection settings' option and enable 'Content language' checkbox.
- Set domains under 'URL language detection configuration' instead of 'Path prefix'
- Enable language settings for 'Basic Page' content type under 'Content language' settings (/admin/config/regional/content-language)
- Assign 'Language Switcher' block in to a region.
- Create a 'Basic Page' content and add the translations.
- Try to switch translation for the content that created in the previous step using language switcher block.


| Comment | File | Size | Author |
|---|---|---|---|
| Screenshot 2021-02-16 at 17.10.08.png | 238.39 KB | arun ak | |
| Screenshot 2021-02-16 at 17.07.02.png | 633.08 KB | arun ak |
Comments
Comment #2
kristen polNeeds to be reproduced on 9.2.
Comment #3
kristen polI don't have my normal dev environment set up but, for comparison, I'm including what I tested using *path prefix* URL detection instead of *domain* URL detection:
/node/19) and "translated" into Spanish/node/19to get rid of any path prefix/en/node/19?language_content_entity=enfor English and/en/node/19?language_content_entity=esfor Spanishlanguage_content_entityis in the URL, so the content is based on that/en/node/19?language_content_entity=esfor both English and Spanishlanguage_content_entityquery parameter toenmakes the English content show/en/node/19?language_content_entity=enfor both English and Spanishesdoesn't affect the English node content because detection is using the query param/es/node/19?language_content_entity=enfor both English and SpanishComment #6
anybodyLooks like this needs a reals META plan issue ;)
Comment #10
geek-merlinI can confirm that whether domain or path based urls does not matter.
Comment #11
geek-merlinMay or may not be a dup.