Skip to main content
Drupal is a registered trademark of Dries Buytaert
Release: OpenID Connect / OAuth client 3.0.0-alpha9 New alpha version released for module openid_connect (3.0.0-alpha9). Usage Milestone: Google Analytics Module google_analytics crossed 1,000 active installs. Release: Timelinr 1.0.1 Minor update available for module timelinr (1.0.1). Release: GraphQL Compose Codegen 1.1.2 Minor update available for module graphql_compose_codegen (1.1.2). Release: Mapy.com 1.1.3 Minor update available for module mapycom (1.1.3). Release: Ckeditor5 entity browser 3.0.3 Minor update available for module ckeditor5_entity_browser (3.0.3). Release: Ckeditor5 entity browser 3.0.1 Minor update available for module ckeditor5_entity_browser (3.0.1). Release: Ckeditor5 entity browser 3.0.2 Minor update available for module ckeditor5_entity_browser (3.0.2). Release: Teamleader Integration 4.0.2 Minor update available for module teamleader (4.0.2). Module Revived: Entityqueue Buttons 1.1.2 Module entityqueue_buttons updated after 8 months of inactivity (1.1.2).

Translation String Import

87 sites Security covered Drupal 10–11
View on drupal.org

This module offers Drush commands and a service to add translations for singular and plural strings within your Drupal site. It allows for manual translation input and can also be integrated into update or deployment hooks for automated translation management.

This module provides a drush command and a service to add UI translations.

Drush

Add a single 'singular' string translation:
drush tsi "example" "Beispiel" "de"

Add a single 'plural' string translation:
drush tpi "1 example" "1 Beispiel" "@count examples" "@count Beispiele" "de"

TSI Service

You can also use the tsi.service to add translations. For example in a update or deploy hook:

\Drupal::service('tsi.service')->addTranslation('example', 'Beispiel', 'de');
\Drupal::service('tsi.service')->addPluralTranslation('1 example', '1 Beispiel', '@count examples', '@count Beispiele', 'de', '');

To import multiple strings you can use:

$translations = [
  'cat' => 'Katze',
  'dog' => 'Hund',
];

\Drupal::service('tsi.service')->addMultipleTranslation($translations, 'de');

Depends on

Dependencies of the latest stable release

  • locale Drupal core

Required by

Tracked projects that depend on this one

No tracked projects depend on this one yet.

Activity

Tracked releases
4
Tracked since
Nov 2024
Latest release
2 months ago
Releases (12 mo)
1 ▼ from 3
Maintenance
Active

Release Timeline

Releases

Version Type Core Release date
1.0.1 Stable 10–11 Jun 17, 2026
1.0.0 Stable 10–11 Apr 14, 2025
1.0.0-beta2 Pre-release 10–11 Nov 22, 2024
1.0.x-dev Dev 10–11 Nov 22, 2024