Skip to main content
drupalreleases

Use direct release data with your AI assistant.

Learn more

Locale Translation Context

Security covered Maintenance fixes only 270 sites

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.

Drupal 10–11

Ask your assistant about Locale Translation Context

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
4
Tracked since
Mar 2024
Latest release
1 month ago
Releases (12 mo)
2 ▲ from 1
Maintenance
Active

Release Timeline

Releases

Version Type Core PHP 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
2.0.0 Stable 9–10 Mar 28, 2024