Drupal is a registered trademark of Dries Buytaert

locale_deploy

28 sites Security covered
View on drupal.org

Introduction

Translations for Drupal core and contrib modules come from localize.drupal.org. In traditional Drupal, you update translations by either running some Drush commands or clicking around in the UI. This gives a site little to no visibility
about the new translations being added. Also it can mean that you're making changes to a live site outside a deployment. Configuration and locale strings are tied together and changes in one can result in changes in the other.

This module enables translations to follow the same deployment path as code and configuration.

Note: This is about how to deploy locale strings and does not interact in anyway with content translation.

Requirements

  • Custom code is located in modules/custom

Installation

Install as you would normally install a contributed Drupal module.

Usage

This module makes no changes to Drupal's user interface. All interaction occurs via Drush.

The module provides the following commands:

  • locale-deploy:localize-translations
  • locale-deploy:custom-translations

Additionally, the module hooks into the updatedb command to ensure that translations are updated during a drush deploy command.

The locale-deploy:localize-translations command gets translations from localize.drupal.org for your site. It places them in your local translations folder. It also updates the site's translations in the database and exports configuration so that all files are correct after the translations have been updated.

The locale-deploy:custom-translations command scans the modules/custom folder to extract any translations there. It will copy them to the custom folder in your local translations folder. There will be one file per language enabled on the site.

Activity

Total releases
1
First release
May 2025
Latest release
9 months ago
Release cadence
Stability
100% stable

Releases

Version Type Release date
1.0.1 Stable May 16, 2025