Drupal is a registered trademark of Dries Buytaert
Release: Leaflet 10.4.11 Minor update available for module leaflet (10.4.11). Release: Session Inspector 1.0.8 Minor update available for module session_inspector (1.0.8). Release: Migrate QA 2.0.4 Minor update available for module migrate_qa (2.0.4). Release: CKEditor Description List 3.0.0 Major update available for module ckeditor_descriptionlist (3.0.0). Release: FlowDrop 2.4.0 Minor update available for module flowdrop (2.4.0). Release: JWT Token Refresh 1.0.4 Minor update available for module jwt_token_refresh (1.0.4). Release: ConReg 1.0.0-beta1 First beta version released for module conreg (1.0.0-beta1). Release: AI Image Studio 1.0.0-beta8 New beta version released for module ai_image_studio (1.0.0-beta8). Usage Milestone: Statistics Counter Module statistics_counter crossed 1,000 active installs. Module Revived: Decoupled Router 2.0.7 Module decoupled_router updated after 11 months of inactivity (2.0.7).

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.

Activity

Tracked releases
3
Tracked since
Apr 2026
Latest release
1 month ago
Releases (12 mo)
3 ▲ from 0
Maintenance
Active

Release Timeline

Releases

Version Type Release date
2.0.0-alpha2 Pre-release Jul 10, 2026
2.0.0-alpha1 Pre-release Jun 25, 2026
2.x-dev Dev Apr 9, 2026