pb_localizer
PB Localizer translates Drupal's Project Browser into your native language. It overlays localized descriptions and categories on-the-fly, removing the English-only barrier for global site builders.
Features
The PB Localizer (Project Browser Localizer) is built on the philosophy that "Language is Trust." It ensures that international site builders can evaluate and select modules in their native language—a critical factor for reducing perceived risk and increasing Drupal adoption globally.
Basic Functionality:
- The "Shadow API" Proxy: Transparently intercepts JSON:API requests from your site to Drupal.org and merges live metadata with local translations without hacking Drupal core.
- Dynamic DOM Translation: Uses a high-performance
MutationObserverto localize hardcoded UI elements (like "X sites report using this module") directly in the Project Browser’s Svelte-based interface. - Translation Integrity: Every translation is linked to a source hash (MD5). If the English original on Drupal.org changes, the module alerts you that the translation might be stale.
- Drush-Powered Workflow: Bulk-download project metadata using
drush pb-downloadfor offline processing or mass AI-translation. - Category Localization: A dedicated UI to translate all module categories and badges globally.
Post-Installation
Once installed, PB Localizer acts as a bridge between the Project Browser and Drupal.org.
- Initial Setup: Navigate to
/admin/config/services/pb-localizer/settingsto define common UI labels for your language. - Translate Categories: Go to
/admin/config/services/pb-localizer/categoriesto map the technical categories to your local language. - Module Translation: Use the overview at
/admin/config/services/pb-localizerto edit titles and descriptions. - Efficiency Pro-Tip: In the translation form, use
Ctrl + Alt + Sto save and immediately jump to the next module in the list.
Note: It is highly recommended to run drush pb-download after installation to populate your local cache with source metadata from Drupal.org.
Additional Requirements
- Drupal Core: ^11
- Contrib Modules: Project Browser
- PHP Extensions:
ext-jsonandext-zipare required for metadata handling and ZIP exports.
Recommended modules/libraries
- AI Translation Tools: Since PB Localizer can export translations, using external tools like DeepL or Google Gemini is recommended to rapidly populate your localized "Shadow API."
Similar projects
Currently, no other module provides deep localization for the dynamic JSON:API data fetched by the Project Browser. While Drupal Core handles the interface (.po files), the project metadata itself remains English-only on Drupal.org—PB Localizer is the only solution to bridge this gap by providing a file-based translation overlay.
Supporting this Module
If you find this module helpful for making Drupal more accessible in your language, please consider contributing translations or supporting development through feedback in the issue queue.
Community Documentation
Documentation is currently being expanded. Check the README.md for technical details on the Shadow API architecture.