Dilbaz - Language Localization and Translation Tool
Optimized String Extraction and POT Generation Engine
1. Overview
Dilbaz is a lightweight yet robust developer tool designed to facilitate the i18n (Internationalization) workflow in WordPress. Unlike traditional scanners that may cause timeout issues on large codebases, Dilbaz utilizes a non-blocking batch scanning mechanism to ensure smooth operation even on resource-constrained servers.
2. Key Features
Batch-Based Scanning
Processes PHP files in blocks to prevent PHP execution timeouts and memory exhaustion.
Optimized Data Transfer
Uses a state-only AJAX protocol. During scanning, only processing statistics are transmitted between the server and the browser, minimizing network overhead.
Internal Storage Management
Extracted strings and file lists are stored in a indexable JSON format within the WordPress uploads directory, allowing for fast re-scans and delta updates.
Live Progress & Timestamps
Features a real-time progress bar and dynamic "time-ago" indicators for file lists and string cache updates.
3. Technical Architecture
The core engine is built on three main pillars:
- Scanner Engine: A regex-based parser that identifies standard WordPress translation functions (
__(),_e(),_n(),_x(), etc.). - Storage Module: Manages persistent data using the WP Filesystem API, ensuring compatibility across different server configurations.
- Admin Controller: Orchestrates the AJAX-driven workflow.
4. System Requirements
| Requirement | Minimum Version |
|---|---|
| WordPress | 5.8 or higher |
| PHP | 7.4 or higher |
| Browser | Modern browsers (ES6 Support) |
5. Usage Guide
Follow these steps to generate your first POT file:
- Navigate to the Dilbaz menu in your WordPress dashboard.
- Select the plugin or theme you wish to scan.
- Click "Prepare File List" to initialize the inventory.
- Execute "Scan Strings" to start the batch extraction process.
- Once completed, use "Generate .pot" to create the final template.
- Plugin Name
- Dilbaz - Language Localization and Translation Tool
- Current Version
- 1.0.0
- Author
- Atakan Au
- License
- GPLv2 or later