Drupal is a registered trademark of Dries Buytaert

Synopsis

Entity Language Access will add an additional access check to canonical routes of translatable content entity types and deny access, if the entity language differs from the current content language.

Potential Use Cases

You may find this module useful, if you don't want to translate all translatable content into all languages immediately and don't want to show untranslated content in its original language.

Requirements

This module requires no modules outside of Drupal core.

Usage

This module adds an additional access check on top of canonical routes of entity types, which will deny access to canonical views of the entity, if there is no translation into the current content language, but will not prevent any other access to the entity. For any listings, e.g. displayed by Views, make sure to add a filter on the translation language, as the module will not hide untranslated entities in this case!

The module assumes that canonical routes of entities use the id entity.${entity_type_id}.canonical, which is the best practice route name for canonical routes of entities in Drupal. It won't work for entities that use other route names for canonical routes.

The module will be active for all translatable content entity types that have a canonical route in all languages.

You may optionally configure a fallback content to be shown instead of a general 403 error page for missing entity translations. The configured content must be translated into all available languages, and be accessible by all users.

  1. Enable the module at Administration > Extend.
  2. Optionally, configure a Node to use as fallback content at Configuration > Region and language > Entity Language Access.
  3. Review the permissions provided by the module. There is a permission to bypass access checks by this module and a permission to administer the module's settings.

Credits

Current maintainers:

The development of this project has been partly sponsored by werk21 GmbH.

Activity

Total releases
2
First release
Dec 2025
Latest release
2 months ago
Release cadence
0 days
Stability
50% stable

Releases

Version Type Release date
1.0.0 Stable Dec 29, 2025
1.x-dev Dev Dec 29, 2025