Skip to main content
Drupal is a registered trademark of Dries Buytaert
Release: Private content 3.1.0 Minor update available for module private_content (3.1.0). Usage Milestone: Focal Point Module focal_point crossed 1,000 active installs. Release: Scheduler Content Moderation Defaults 1.1.3 Minor update available for module scheduler_content_moderation_defaults (1.1.3). Release: FlowDrop 2.5.0 Minor update available for module flowdrop (2.5.0). Release: Ejector Seat 3.0.0 Major update available for module ejectorseat (3.0.0). Release: Ejector Seat 2.0.1 Minor update available for module ejectorseat (2.0.1). Release: Form Style 2.0.1 Minor update available for module form_style (2.0.1). Release: Direct Upload Media Image 1.1.3 Minor update available for module dumi (1.1.3). Release: Changelogify 1.8.1 Minor update available for module changelogify (1.8.1). Module Revived: Commerce Shipping Order Percentage 1.2.0 Module commerce_shipping_order_percentage updated after 11 months of inactivity...

Configuration Language Lock

Security covered Drupal 11 · not 10
View on drupal.org

This module helps keep your Drupal site's configuration language consistent by enforcing a single, designated language for all configuration. It prevents multilingual drift by ensuring configuration is stored in your chosen language, regardless of import or request language, and provides a tool to fix any existing inconsistencies.

Configuration Language Lock takes a best effort to ensure that site configuration is stored in one explicitly chosen language, regardless of request language or source language of imported configuration. It also provides a settings page to update configuration that may have been created earlier in another language or somehow slipped through the protections of this module (e.g. with config sync where the enforcement is intentionally skipped).

This solves common multilingual drift problems where configuration can end up with mixed langcode values after UI edits, module/theme installs, config actions, or recipe application.

In multilingual sites, configuration may be created or updated in whatever language is current for the request, or in whatever language a config file was shipped with — even in invalid languages in case of recipes. Over time, this can produce inconsistent configuration language state.

This module provides a single lock language and takes a best effort to enforce it consistently across configuration writes and installs.

Features

After initial installation and when the locked language is unset, the module does not interfere with Drupal's config handling intentionally. This keeps existing behavior unchanged until an administrator explicitly selects a configuration language. Installing the module without configuring it should be safe and undoable.

When a valid lock language is configured, the module:

  • enforces config entity langcode on save with hook_entity_presave
  • hides language selectors on core config entity forms where they would appear (menu, date format, vocabulary, and view)
  • protects the lock language from deletion
  • annotates the lock language in the language admin UI
  • runs rewrite batches after module/theme installs
  • normalizes recipe-imported config to the lock language
  • optionally follows the site default language automatically when it changes

Post-Installation

Configure the locked language at admin/config/regional/config-language-lock. The page will inform you of the distribution of languages across your config and offer to unify them under one language, which is later kept enforced on a best effort basis. Optionally enable the follow site default language checkbox to have the lock and a full rewrite batch triggered automatically whenever the site default language is changed. If there are mismatches in configuration language you can come back here later and manually enforce consistency again.

Additional Requirements

The module optionally works with the Interface translation module. When that is enabled, the config langcode rewrite features of that module (on module and theme install) are disabled and a replacement is provided which is based on the lock language instead and can handle switching from one foreign language to another.

Similar projects

There is the Config Read-only mode module which protects all writes to your configuration and will naturally avoid diverging languages too. Configuration Language Lock, by contrast, just takes a best effort to enforce a consistent language and does not prohibit configuration changes in general.

You may also want to try Language Audit which surfaces a lot more details about configuration language divergence on your site. If the all-in-one update method in this module is not right for you, that would help you find language issues (and manually fix them using config export/import for example).

Community Documentation

The module has really extensive documentation about what it does and how it does it.

LLM disclosure

The development of the module was accelerated with LLM.

Depends on

Dependencies of the latest stable release

No dependencies recorded for this project.

Required by

Tracked projects that depend on this one

No tracked projects depend on this one yet.

Activity

Tracked releases
3
Tracked since
Jul 2026
Latest release
5 days ago
Releases (12 mo)
3 ▲ from 0
Maintenance
Active

Release Timeline

Releases

Version Type Core Release date
1.0.1 Stable 11 Aug 25, 2026
1.0.0 Stable 11 Aug 18, 2026
1.0.x-dev Dev 11 Jul 16, 2026