Skip to main content
drupalreleases

Use direct release data with your AI assistant.

Learn more

String

Security covered Under active development 9 sites

Part of the String ecosystem · 6 projects

This module provides a way to manage and translate strings in Drupal using a "keyword" philosophy. Developers can define keywords with optional default values, which then integrate with Drupal's core translation system for easy translation management.

A Drupal module for managing and translating strings using "Keyword" philosophy.

t('Drupal is great');

t('drupal.great');

In the first method, messages are written in the language of the default locale (English in this case). That message is then used as the "id" when creating translations.

In the second method, messages are actually "keywords" that convey the idea of the message. The keyword message is then used as the "id" for any translations. In this case, translations must be made for the default locale (i.e. to translate drupal.great to Drupal is great).

String enables developers to,

  • define Keyword (i.e. drupal.great)
  • optionally provide a default value Drupal is great
  • integrate with core's translation api so that it works well with t function, locale import/export, editing interface translation, etc.

Documentation

For detailed documentation, please visit our documentation site.

Quick Links

Support

Sample usage

Current (Core) String t('Dashboard') t('dashboard.title') t('My Dashboard') t('user_dashboard.title') t('Welcome @name!', ['@name' => $name]) t('dashboard.welcome_message.title', ['@name' => $name]) format_plural($count, '1 item', '@count items') format_plural($count, 'search_result.item_count', 'search_result.item_count')
Drupal 10–11

Ask your assistant about String

Check compatibility with your Drupal and PHP version, maintenance and security coverage, from current release data. How it works

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
9
Tracked since
Apr 2023
Latest release
1 year ago
Releases (12 mo)
0 ▼ from 7
Maintenance
Slowing

Release Timeline

Releases

Version Type Core PHP Release date
2.0.1 Stable 10–11 Oct 8, 2025
2.0.0 Stable 10–11 Aug 1, 2025
2.x-dev Dev 10–11 Aug 1, 2025
1.2.0 Stable 10–11 Jul 11, 2025
1.1.0 Stable 10–11 May 14, 2025
1.0.0 Stable 10–11 May 13, 2025
1.x-dev Dev 10–11 Dec 22, 2024
1.0.0-alpha2 Pre-release 8–10 Jan 30, 2024
1.0.0-alpha1 Pre-release 8–10 Apr 19, 2023