Skip to main content
drupalreleases

Use direct release data with your AI assistant.

Learn more

gText

Security covered Maintenance fixes only 726 sites

This module provides a more convenient interface for translating text strings across all languages on your site, offering a unified translation page and integrating with Google Translate. It also includes helper functions for translating strings and handling pluralization with custom contexts.

πŸ‡ΊπŸ‡¦

This module is maintained by Ukrainian developers.
Please consider supporting Ukraine in a fight for their freedom and safety of Europe.

Utility to simplify the translation of lines on the site.

Compared to drupal 7, in drupal 8 and 9 the translation of lines is quite inconvenient: it is difficult to translate one line into all languages ​​due to the need to constantly switch languages.

The module provides an alternative interface for translating lines:

  1. translate a line into all languages ​​on one page without unnecessary clicks;
  2. page of the translation line in all languages ​​(as in drupal 7);
  3. possibility of translation via google translate service;
  4. availability of the google translate service on the pages of translation of field names, blocks, entities, views, etc .;
  5. block page reloads if no data is saved;
  6. exporting translations;

Other functionality

<?php
// Analog "t('Home page', [], ['context' => 'project']);"
gtext('project')->t('Home page');
gtext()->project('Home page');

// Analog "t('User @name', ['@name' => 'Admin'], ['context' => 'project'])"
gtext()->project('User @name', ['@name' => 'Admin']);
gtext('project')->t('User @name', ['@name' => 'Admin']);

// Analog \Drupal::translation()->formatPlural(1, '@count comment', '@count comments', [], ['context' => 'project']);
gtext()->project->plural(1, '@count comment', '@count comments');

?>
Drupal 8–11

Ask your assistant about gText

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
5
Tracked since
Apr 2023
Latest release
2 years ago
Releases (12 mo)
0
Maintenance
Dormant

Release Timeline

Releases

Version Type Core PHP Release date
9.0.12 Stable 8–11 Jul 31, 2024
9.0.11 Stable 8–10 Oct 7, 2023
9.0.10 Stable 8–10 Jul 31, 2023
9.0.9 Stable 8–10 May 16, 2023
9.0.8 Stable 8–10 Apr 20, 2023