- Issue created by @eliasbrat
- πΊπΈUnited States eliasbrat
I can not create a fork now on Drupalcode, so I made a patch file.
This patch contains an implementation of the ticket description.
Currently, the advanced_language_selector block displays all available languages configured on the site. However, in some use cases, site administrators may want to display only a subset of languages β for example, showing only English and Spanish, while hiding Arabic (even if translations exist).
This flexibility is often needed for:
Multilingual sites where certain translations are still in progress.
Regional/language-specific content targeting.
Testing or phased rollout of new languages.
Add a new block configuration setting (allowed_languages) to let site administrators select which languages should be shown in the language switcher.
Add a checkboxes field to the block configuration form listing all available languages.
Store the selected languages in the block's $configuration.
Filter $links->links in build() to only include allowed languages.
If no configuration is set, fallback to displaying all languages (default behavior remains unchanged).
Add languages cache context to the render array for proper cache variation.
Active
1.0
Code
I can not create a fork now on Drupalcode, so I made a patch file.
This patch contains an implementation of the ticket description.