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
tfunction, 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') |
Supporting organizations:
Development
Project information
- Project categories: Content editing experience, Developer tools, Multilingual
15 sites report using this module
- Created by d34dman on , updated
Stable releases for this project are covered by the security advisory policy.
Look for the shield icon below.

