Install

Works with Drupal: ^10.2 || ^11 || ^12

Using Composer to manage Drupal site dependencies

Alternative installation files

Download tar.gz 187.57 KB
MD5: c0ca499bdd5f80304d5e6ec4c5703519
SHA-1: 227aa66173881c3162fe72bfddf99714823f8837
SHA-256: 323e6a0fae365c221d2ade17ba508dce72e6a7aaa5dd2c1b2eb2fe88a23fd66f
Download zip 209.23 KB
MD5: ee72d52ad8f4c4f98a1a7bd0c89c0e43
SHA-1: cdbe3e1e64ffcf065c084c5bf31275b3dfd2b6d3
SHA-256: 8f4c8f0d1dc11c46a9483714f16dda5730be2491ea9b64c5898cf682666a57f5

Release notes

This release adds a public API to set texts from deploy and update hooks. It also makes the CSV import and export easier to find.

New features

  • Deployable texts (#3630645): the new texts.translations service lets a deploy hook or an update hook set one or more text keys:
    function example_deploy_set_language_label(): void {
      \Drupal::service('texts.translations')->add([
        'language' => [
          'de' => 'Sprache',
          'en' => 'Language',
          'fr' => 'Langue',
        ],
      ]);
    }
    
    • Only the languages in the call are written. Other languages stay unchanged.
    • A new key needs a string in the site default language.
    • The optional second argument sets the texts context (default: default).
    • The whole call is checked before anything is saved. An empty string, a language that is not enabled, a plural text, or an entity validation error throws an InvalidArgumentException and saves nothing.
    • Plural texts cannot be set with this service. Use the CSV import for them.
  • CSV import help: the import form now descrat and shows an example.
  • Import / Export actions: the texts overviexts) now has "Import CSV" and "Export CSV" action
    links.

Upgrade notes

No database updates and no configuration changes. Clear the ca the new service and the action links are registered.

Contributors

didebru, ayalon

Created by: ayalon
Created on: 29 Oct 2026 at 09:42 UTC
Last updated: 29 Oct 2026 at 09:42 UTC
New features
Insecure

Other releases