Skip to main content
drupalreleases
Release: Cms 2.2.3 — Update released for Drupal core (2.2.3)! Release: Easy Breadcrumb 2.0.11 — Minor update available for module easy_breadcrumb (2.0.11). Release: Bootstrap 8.x-3.42 — Minor update available for theme bootstrap (8.x-3.42). Release: Editoria11y Accessibility Checker 3.0.10 — Minor update available for module editoria11y (3.0.10). Release: Editoria11y Accessibility Checker 2.2.24 — Minor update available for module editoria11y (2.2.24). Release: Leaflet 10.4.13 — Minor update available for module leaflet (10.4.13). Release: Flag 5.1.1 — Minor update available for module flag (5.1.1). Release: Layout Paragraphs 3.0.0-beta5 — New beta version released for module layout_paragraphs (3.0.0-beta5). Module Revived: Bootstrap 8.x-3.41 — Theme bootstrap updated after 6 months of inactivity (8.x-3.41). Security Coverage: Component Library — Module component_library now has official Drupal security advisory coverage.

Translation template extractor

4,329 sites Security covered Drupal 8–11
View on drupal.org

This project provides an interface for extracting translation template files from your local Drupal projects, either through a web interface or Drush commands. It can also be used internally by localization platforms to parse translatable strings.

The Translation template extractor provides a web based and Drush-integrated Gettext translation template extractor interface for Drupal as well as a reusable API to look for translatable strings and translatability errors.

Do you need to use this tool?

This tool is used under the hood at http://localize.drupal.org/ to serve as a parsing machine for Drupal.org project releases. If you intend to contribute to Drupal interface translations on https://localize.drupal.org/, there is no need to use this tool, it is integrated there seamlessly. It is possible to export translation templates for drupal.org project releases there without using this tool, such as https://localize.drupal.org/translate/projects/potx/export are templates for this specific project.

You need this project if you are in need of translation template source files directly from your locally running projects, especially custom projects.

Using with Drush

Use the potx drush command with Drush 8 or 9/10 to generate translation templates from local source code. Examples:

  • Extract translatable strings from applicable files in current directory and write to single output file: drush potx
  • Extract translatable strings from applicable files of example module and write to module-specific output file: drush potx multiple --modules=example
  • Extract translatable strings from example.module and write to single output file: drush potx --files=sites/all/modules/example/example.module
  • Extract strings from folder projects/drupal/8 using API version 8: drush potx single --api=8 --folder=projects/drupal/8

Using the user interface

A basic user interface is exposed on the admin/config/regional/translate/extract page (the Extract tab on the User interface translation page).

Template extraction may require extensive amounts of memory, if extraction fails, try raising the memory limit.

Depends on

Dependencies of the latest stable release

  • locale Drupal core

Required by

1 tracked project depends on this one

Activity

Tracked releases
5
Tracked since
Mar 2023
Latest release
2 months ago
Releases (12 mo)
3 ▲ from 0
Maintenance
Active

Release Timeline

Releases

Version Type Core Release date
2.0.0-alpha2 Pre-release 10–11 Jul 10, 2026
2.0.0-alpha1 Pre-release 10–11 Jun 25, 2026
2.x-dev Dev 10–11 Apr 9, 2026
8.x-1.1 Stable 8–11 Jul 9, 2024
8.x-1.0 Stable Mar 14, 2023