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). Release: Timelinr 1.0.1 Minor update available for module timelinr (1.0.1). Usage Milestone: Simplify Module simplify crossed 10,000 active installs. Usage Milestone: Views Reference Filter Module entityreference_filter crossed 10,000 active installs. Usage Milestone: Dropdown Language Module dropdown_language crossed 10,000 active installs. Usage Milestone: Paragraphs Browser Module paragraphs_browser crossed 10,000 active installs. Usage Milestone: OpenAPI Module openapi crossed 10,000 active installs. Usage Milestone: Decoupled Router Module decoupled_router crossed 10,000 active installs. Usage Milestone: Time Field for Drupal 8+ Module time_field crossed 10,000 active installs. Module Revived: Entityqueue Buttons 1.1.2 Module entityqueue_buttons updated after 8 months of inactivity (1.1.2).

Texts: key-based strings and translations

304 sites Security covered Drupal 8–11
View on drupal.org

The Texts module provides a key-based system for managing and translating strings within Drupal. It offers an improved user interface for managing translations, supports pluralization and placeholders, and includes CSV import/export functionality. It also offers optional GraphQL support for fetching translations in decoupled environments.

INTRODUCTION

Texts is a module, that allows to manage and translate strings / texts using a key-based approach.
If you work in a decoupled environment, this module allows you to manage your frontend translations within Drupal with ease.
The module offers an improved UI to manage translations in the Drupal backend.

It supports pluralization (singular / plural) and placeholders, like the normal t() function.

The module comes with optional GraphQL support to fetch the translations in a decoupled environment.

https://www.drupal.org/project/texts

Import / Export

The module has CSV import / export functionality. You can quickly export all strings and translate them in an external tool.

API

You can use the function getTexts(): (similar to t())

Example:

getTexts(
  'login.button', // The translation key
  ['@name => 'Luke Skywalker'], // (optional) placeholders
  ['default_translation' => 'Login Button @name', 'context' => 'default'] // (optional) options
)

This will create a translation based on the key login.button if it does not exist and return its translation.

You can use the function getTextsPlural(): (similar to formatPlural())

Example:

getTextsPlural(
   1, // count
  'login.button', // The translation key
  '1 year @name', // singular
  '@count years @name', // plural
  ['@name => 'Luke Skywalker'], // (optional) placeholders 
  ['default_translation' => 'Login Button @name', 'context' => 'default'] // (optional) options
)

This will create pluralized texts.

Twig support

You can use the following Twig filters:

  • |getTexts(key)
  • |getTextsPlural(key)

REQUIREMENTS

  • locale module
  • content_translation module.

INSTALLATION

No directly comparable modules exist in Drupal 8.

  • Locale module of Drupal core provides the t() function and string based translations based on an English base string.

CONFIGURATION

  • You can configure the module under /admin/config/regional/texts
  • It is possible to hide unwanted language in the overview.

MAINTAINERS

Current maintainers:

If you want to help or be involved, please contact me.

If you find any issues please create an issue after checking that the issue
is not a duplicate of an existing issue.

Depends on

Dependencies of the latest stable release

  • content_translation Drupal core
  • locale Drupal core

Required by

Tracked projects that depend on this one

No tracked projects depend on this one yet.

Activity

Tracked releases
10
Tracked since
Jan 2025
Latest release
7 months ago
Releases (12 mo)
4 ▼ from 6
Maintenance
Slowing

Release Timeline

Releases

Version Type Core Release date
1.0.14 Stable 8–11 Jan 22, 2026
1.0.13 Stable 8–11 Dec 2, 2025
1.0.12 Stable 8–11 Dec 1, 2025
1.0.11 Stable 8–11 Sep 22, 2025
1.0.10 Stable 8–11 Jul 7, 2025
1.0.9 Stable 8–11 Jun 13, 2025
1.0.8 Stable 8–11 Jun 10, 2025
1.0.7 Stable 8–11 Jan 22, 2025
1.0.6 Stable 8–11 Jan 21, 2025
1.0.5 Stable 8–11 Jan 21, 2025