Search translations directory recursively for localization files

Created on 23 August 2018, almost 7 years ago
Updated 13 May 2025, 3 months ago

Problem/Motivation

In a composer managed repository, there is a distinction between any files that are provided by packages and those that are local. A typical repository looks as follows:

htdocs (or: web)
-/modules
--/contrib
--/custom
-/themes
--/contrib
--/custom

Drupal can import localization files provided in a local directory or download them from localize.drupal.org. When the webserver is configured to not make any outgoing requests, you can use a composer plugin to download these for you (https://github.com/drupal-composer/drupal-l10n).

It would be nice to have the locale importer search the translations directory, allowing for this directory structure:

translations
-/contrib
-/custom

Proposed resolution

Search translations directory recursively for localization files, so contributed localization files can be saved in a different directory than custom localization files .

Remaining tasks

Write change record

User interface changes

None.

API changes

None.

Data model changes

None.

Release notes snippet

Local translations directory can now be organised like modules and theme directories.

Feature request
Status

Needs work

Version

11.0 🔥

Component

locale.module

Created by

🇳🇱Netherlands idebr

Live updates comments and jobs are added and updated live.
Sign in to follow issues

Comments & Activities

Not all content is available!

It's likely this issue predates Contrib.social: some issue and comment data are missing.

Production build 0.71.5 2024