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: Opensolr Search 4.5.0 Minor update available for module opensolr_search (4.5.0). Release: Timelinr 1.0.1 Minor update available for module timelinr (1.0.1). Release: Video.js (HTML5 Video Player) 10.0.0-alpha1 First alpha version released for module videojs (10.0.0-alpha1). 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. Module Revived: Entityqueue Buttons 1.1.2 Module entityqueue_buttons updated after 8 months of inactivity (1.1.2).

Locale Translation Context

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

This module enhances Drupal's translation interface by allowing you to filter and export translatable strings based on their context. This makes it easier to manage and translate custom strings separately from core and contributed modules.

This module adds context filtering capabilities to the core translation interface.

Impacted pages

Configuration > Regional and Language > Translate interface > Translate

Allow to filter the translated strings by context.

Configuration > Regional and Language > Translate interface > Export

Allow to export strings for a specific context.

Use case

Using contexts when writing custom code is a good practice. It allows to clearly separate your custom strings from the core and contrib modules strings, and to be able to translate the same string differently if the context of the word is not the same.

Example of a translation string using context:
t('This is my custom string', array(), array('context' => 'custom_project');

Unfortunately, the Drupal core does not provide any functionalities in the admin interface to make use of the strings translation contexts. This module adds basic functionalities to manipulate contexts.

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
3
Tracked since
Jul 2025
Latest release
6 days ago
Releases (12 mo)
2 ▲ from 1
Maintenance
Active

Release Timeline

Releases

Version Type Core Release date
2.0.3 Stable 10–11 Aug 26, 2026
2.0.2 Stable 10–11 Aug 21, 2026
2.0.1 Stable 10–11 Jul 28, 2025