I think it makes no sense to display a link for a page in the current language. This reloads the page when accidentally clicked and adds an extra link to the current page in the markup. At the same time, there may be needed to display the name of the current language with the text only.
| Comment | File | Size | Author |
|---|---|---|---|
| #12 | 3122847-12.patch | 7.76 KB | szeidler |
| #6 | interdiff-3122847-5-6.diff.txt | 565 bytes | szeidler |
| #6 | 3122847-6.patch | 5.18 KB | szeidler |
| #5 | interdiff-3122847-2-5.diff.txt | 1.47 KB | szeidler |
| #5 | 3122847-5.patch | 5.19 KB | szeidler |
Comments
Comment #2
skymen commentedI have added this functionality. Please, test it and review.
Comment #3
skymen commentedPicture with changes in UI.

Comment #4
szeidler commentedHi,
thanks for your contribution. I just had a short glance for now and it looks quite good.
But just one initial thought: We need to implement an update hook that reflects the schema change, so that sites, that previously had enabled the "Hide current language" checkbox will have the correct
current_language_modeselected after the update.Comment #5
szeidler commentedHere's a patch adding an update hook to transform the
hide_current_languagetocurrent_language_modewithhide_link.I also changed the default value of the new select field to "default" to match the naming convention we use for the other select, too.
Comment #6
szeidler commentedHere's an updated patch using dependency injection to follow the recently committed #3091592: Use dependency injection for LanguageManager in LanguageSwitcherLinkProcessor
Comment #7
skymen commented@szeidler Thanks! Patch works good on Drupal 9.0.0-beta2. RTBC+1
Comment #8
skymen commented@szeidler As I see you already includes this functionality to beta version. So I think we can close this issue?
Comment #9
skymen commentedComment #10
szeidler commentedI might miss a thing here, but this is not yet merged into the dev-branch or a release. I will give it another look soon.
Comment #11
vegardjo commentedTested on Drupal 8.9.6 and works like a charm!
Comment #12
szeidler commentedAlso added tests. Let's see what testbot things. If it goes green we can commit it.
Comment #13
szeidler commentedComment #15
szeidler commentedThis is pushed to 8.x-dev and will be part of the next release.
Thanks for everyone contributed here!