Drupal is a registered trademark of Dries Buytaert
Protected Pages 3.0.0 Major update available for module protected_pages (3.0.0). Commerce Core 3.3.8 Minor update available for module commerce (3.3.8). Layout Builder Reorder 2.0.1 Minor update available for module layout_builder_reorder (2.0.1). Ban 1.1.0 Minor update available for module ban (1.1.0). Field Formatter Range 2.0.0 Major update available for module field_formatter_range (2.0.0). Field Formatter Range 8.x-1.8 Minor update available for module field_formatter_range (8.x-1.8). UI Patterns (SDC in Drupal UI) 2.0.18 Minor update available for module ui_patterns (2.0.18). Varbase FAQs 9.2.1 Minor update available for module varbase_faqs (9.2.1). Search API Solr 4.3.11 Module search_api_solr updated after 14 months of inactivity (4.3.11). Provus Mega Menu Module provus_mega_menu crossed 1,000 active installs.

Disable language

7,996 sites Security covered
View on drupal.org

This module allows administrators to disable languages on a Drupal site, preventing them from appearing in language switchers and sitemaps. It can also redirect users who do not have permission to view disabled languages to a specified language, with options to override this behavior for specific routes.

Disable language lets you disable languages on Drupal 8 sites.

It does the following things when you disable a language:

  • Filters out the disabled languages in the language switcher
  • Filters out the generated links in an Simple XML sitemap (https://www.drupal.org/project/simple_sitemap)
  • Filters out the generated links in the head (with the hreflang attribute)
  • Redirects user that don't have permissions to view disabled languages
  • Choose the language to redirect to if the user doesn't have permission (configurable for each language)
  • Allows you to override the redirect behaviour for certain routes/paths. Default routes for one time login functionality have been added as defaults and are in an update hook.

Common use cases:

  • The site is live but you want to give the admin the possibility to stage content in a certain language, so it isn't visible for certain roles. (e.g. anonymous,...) until the admin is finished.

Installation

See the README for configuration instructions

Similar modules

  • Language access (https://www.drupal.org/project/language_access) Main differences with version 1.3:
    • Language access gives a throws a 403 exception while disable language redirects to a configurable language
    • Language access allows you assign permissions per language, disable language provides a permission to view disabled languages

Activity

Total releases
1
First release
Feb 2025
Latest release
1 year ago
Releases (12 mo)
0 ▼ from 1
Maintenance
Dormant

Releases

Version Type Release date
8.x-1.0-rc2 Pre-release Feb 5, 2025