netresearch / nr-textdb
Allows you to edit the translations in the back end
Installs: 626
Dependents: 0
Suggesters: 0
Security: 0
Stars: 0
Watchers: 4
Forks: 0
Open Issues: 33
Type:typo3-cms-extension
pkg:composer/netresearch/nr-textdb
Requires
- ext-libxml: *
- ext-simplexml: *
- ext-zip: *
- symfony/console: ^7.0
- typo3/cms-backend: ^13.4
- typo3/cms-core: ^13.4
- typo3/cms-extbase: ^13.4
- typo3/cms-extensionmanager: ^13.4
Requires (Dev)
- a9f/typo3-fractor: ^0.5
- friendsofphp/php-cs-fixer: ^3.75
- overtrue/phplint: ^9.5
- phpstan/phpstan: ^2.0
- phpstan/phpstan-deprecation-rules: ^2.0
- phpstan/phpstan-phpunit: ^2.0
- phpstan/phpstan-strict-rules: ^2.0
- saschaegerer/phpstan-typo3: ^2.0
- ssch/typo3-rector: ^3.0
- typo3/testing-framework: ^9.0
Suggests
- dev-main
- dev-master / 3.0.x-dev
- 3.0.1
- 3.0.0
- dev-TYPO3-12 / 2.0.x-dev
- 2.0.11
- 2.0.10
- 2.0.9
- 2.0.8
- 2.0.7
- 2.0.6
- 2.0.5
- 2.0.4
- 2.0.3
- 2.0.2
- 2.0.1
- 2.0.0
- dev-TYPO3-11 / 1.1.x-dev
- 1.1.1
- 1.1.0
- 1.0.3
- 1.0.2
- 1.0.1
- 1.0.0
- 0.6.0
- 0.5.0
- 0.4.3
- 0.4.2
- 0.4.1
- 0.4.0
- 0.3.1
- 0.3.0
- 0.2.1
- 0.2.0
- 0.1.0
- 0.0.6
- 0.0.5
- 0.0.4
- 0.0.3
- v0.0.2
- v0.0.1
- dev-feature/rust-ffi-bulk-optimization
- dev-l10n_main
- dev-feature/async-import-queue
- dev-copilot/setup-copilot-instructions
- dev-feature/optimize-import-performance
- dev-feature/streaming-xliff-parser
- dev-NEXT-98
- dev-security/fix-xxe-vulnerability-in-xlf-import
- dev-copilot/set-up-copilot-instructions
- dev-copilot/add-gitattributes-export-ignore
- dev-copilot/refactor-makeinstance-usage
- dev-feature/comprehensive-localization
- dev-docs/improve-readme-clarity-and-use-cases
- dev-feature/enhance-project-metadata
- dev-copilot/fix-ci-issues-for-cgl
- dev-integration
This package is auto-updated.
Last update: 2025-11-18 08:12:18 UTC
README
Manage TYPO3 translations directly in the backend โ no more digging through language files
What is TextDB?
TextDB is a powerful TYPO3 extension that transforms how you manage translations. Instead of editing language files scattered across your project, manage all translations through a convenient backend module with filtering, search, and bulk operations.
Perfect for:
- ๐ Multi-language websites with frequent translation updates
- ๐ฅ Clients and editors who need to update translations without touching code
- ๐ Translation workflows requiring import/export capabilities
- ๐ Agencies managing multiple TYPO3 projects with consistent translation processes
๐ฏ What TextDB Is (and Isn't)
โ TextDB is designed for: Frontend System Strings
User interface elements that come from your code, NOT editor-created content:
- โ Form labels: "First Name", "Email Address", "Submit Button"
- โ Button texts: "Add to Cart", "Checkout", "Learn More"
- โ Error messages: "Invalid email format", "Field is required"
- โ Navigation labels: "Products", "About Us", "Contact"
- โ Status messages: "Item added to cart", "Order confirmed"
- โ Validation messages, tooltips, placeholder texts
Example Scenario: Your e-commerce checkout has 50+ labels/buttons needing German, French, and Spanish translations. Instead of editing .xlf files, editors manage them through TextDB's backend module.
โ TextDB is NOT for:
- โ Page content created by editors (use TYPO3's built-in page translation)
- โ News articles or blog posts (use news/blog extension translation features)
- โ Content elements like text blocks, images (use TYPO3 content localization)
- โ Backend module labels (use TYPO3's core translation system)
- โ TCA field labels (use locallang_db.xlf in your extension)
๐ Translation Scope
TYPO3 Translation Landscape:
โโ Backend/Admin Interface โ TYPO3 Core locallang files
โโ Content Elements โ TYPO3 Page/Content translation
โโ Editor-created content โ TYPO3 Localization features
โโ Frontend System Strings โ โจ TextDB (YOU ARE HERE)
๐ Real-World Use Cases
Use Case 1: Multi-Language E-Commerce Checkout
Problem: Your checkout flow has 80+ UI strings (field labels, buttons, validation messages) needing translations in German, French, and Spanish.
Without TextDB: Developers edit .xlf files for every text change, deploy to production.
With TextDB: Product managers update translations directly in backend, changes live immediately.
Result: Translation updates in minutes, not days. Non-technical staff manage translations independently.
Use Case 2: SaaS Application with Dynamic Forms
Problem: Multi-tenant SaaS with 200+ form labels across 15 modules, requiring consistent translation management.
Without TextDB: Scattered .xlf files across multiple extensions, no central overview, duplicate translations.
With TextDB: Hierarchical organization by component/type, centralized filtering, bulk operations, zero duplication.
Result: 70% reduction in translation maintenance time, consistent terminology across modules.
Use Case 3: Agency Managing Multiple Client Sites
Problem: 20+ TYPO3 installations, each with custom form/button texts needing German/English translations.
Without TextDB: Copy .xlf files between projects, manual sync, version control overhead.
With TextDB: Export/import workflows, standardized translation structure, zero-friction migration via textdb:translate.
Result: Standardized translation process across all clients, 50% faster project setup.
Use Case 4: Government Website Compliance
Problem: Legal requirements demand audit trails for translated UI strings, editor-friendly workflow without file access.
Without TextDB: Developers as bottleneck for every text change, no change tracking, risky file edits. With TextDB: Backend module access for translators, database change tracking, missing translation detection.
Result: Compliance-ready audit trails, editor empowerment, reduced developer burden.
๐ Before & After: The TextDB Transformation
Traditional File-Based Approach (Without TextDB)
Your TYPO3 Project/
โโโ typo3conf/ext/my_extension/
โ โโโ Resources/Private/Language/
โ โโโ locallang.xlf # 150 lines of XML
โ โโโ de.locallang.xlf # 150 lines (duplicated structure)
โ โโโ fr.locallang.xlf # 150 lines (duplicated structure)
โ โโโ locallang_checkout.xlf # Another 200 lines
โโโ typo3conf/ext/another_extension/
โ โโโ Resources/Private/Language/
โ โโโ ... more scattered files
Workflow: Developer edits XML โ Git commit โ Deploy โ Cache clear โ Test
Problems:
- โ Non-developers can't update translations
- โ Changes require full deployment cycle
- โ No central overview of all translations
- โ Duplicate structure across language files
- โ Merge conflicts in XML files
- โ No built-in search/filter capabilities
Database-Backed Approach (With TextDB)
Your TYPO3 Backend/
โโโ Netresearch โ TextDB Module
โโโ ๐ Search: [button checkout] # Instant filtering
โโโ ๐ Filter: Component: "checkout" | Type: "button"
โ
โโโ โ๏ธ Edit inline:
โ โโโ EN: "Proceed to Checkout" โ [Click to edit]
โ โโโ DE: "Zur Kasse gehen" โ [Click to edit]
โ โโโ FR: "Passer ร la caisse" โ [Click to edit]
โ
โโโ ๐ฅ Import: Upload XLF โ Auto-merge
โโโ ๐ค Export: Download ZIP (all languages)
Workflow: Editor logs in โ Click translation โ Edit โ Save โ Live immediately
Benefits:
- โ Non-developers manage translations independently
- โ Changes live in seconds (no deployment)
- โ Centralized dashboard with 500+ translations
- โ Single source of truth (no XML duplication)
- โ Advanced filtering: component, type, placeholder, value search
- โ Export/import for translation agencies
- โ
Zero-friction migration via
textdb:translateViewHelper
Migration Path: Zero Disruption
Phase 1: Prepare (5 minutes)
<!-- Add namespace to your templates -->
xmlns:textdb="http://typo3.org/ns/Netresearch/NrTextdb/ViewHelpers"
Phase 2: Auto-Import (Automatic)
<!-- Replace f:translate with textdb:translate --> <textdb:translate key="LLL:EXT:my_ext/Resources/Private/Language/locallang.xlf:submit" /> <!-- First render automatically imports to database --> <!-- All existing translations preserved -->
Phase 3: Optimize (Gradual)
<!-- Switch to native syntax at your own pace --> <textdb:textdb component="checkout" type="button" placeholder="submit" /> <!-- Old .xlf files can stay as backup until you're confident -->
Zero Downtime: Existing translations continue working during migration. Zero Data Loss: Automatic import preserves all language variants. Zero Risk: Rollback anytime by reverting ViewHelper change.
โจ Features
Backend Translation Management
- User-friendly backend module for managing all translations
- Advanced filtering by component, type, and placeholder
- Multi-language support with TYPO3's site configuration
- Inline editing of translations directly in the list view
Import & Export
- XLF file import/export for easy translation workflows
- Bulk operations for updating multiple translations at once
- Overwrite protection with optional merge strategies
- Multi-language export for all configured site languages
Migration Tools
- ViewHelper for migration from LLL files to database storage
- Automatic translation detection and import during migration
- Backward-compatible migration path preserving existing translations
Developer Features
- Extbase ViewHelpers (
textdb:textdb,textdb:translate) - Console commands for automated import workflows
- Structured data model (Environment โ Component โ Type โ Placeholder)
- TYPO3 v13 compatibility with modern dependency injection
๐ What Makes TextDB Unique
Competitive Comparison
| Feature | TextDB | l10nmgr | Snowbabel | translatelabels | TYPO3 Core |
|---|---|---|---|---|---|
| Frontend System Strings | โ Primary Focus | โ No | โ No | โ ๏ธ Partial | โ Backend Only |
| Database-Backed Storage | โ Yes | โ Yes | โ Yes | โ Yes | โ File-Based |
| Zero-Friction Migration | โ Auto-Import | โ Manual | โ Manual | โ Manual | N/A |
| Backend Module | โ Advanced Filtering | โ Workflow-Heavy | โ Simple | โ Basic | โ No |
| XLF Import/Export | โ Multi-Language ZIP | โ Complex Workflow | โ ๏ธ Limited | โ No | โ Single Files |
| Hierarchical Organization | โ 4-Level Structure | โ Flat | โ Flat | โ Flat | โ File Structure |
| Live Translation Updates | โ Instant | โ ๏ธ Via Workflow | โ Instant | โ Instant | โ Requires Deployment |
| Non-Developer Editing | โ Backend Module | โ ๏ธ Complex | โ Simple | โ Basic | โ File Access Needed |
| Code Quality | โ PHPStan 10 | โ ๏ธ Lower | โ ๏ธ Lower | โ ๏ธ Lower | โ High |
| TYPO3 v13 Ready | โ Yes | โ ๏ธ Legacy Support | โ Outdated | โ Unmaintained | โ Yes |
Key Differentiators
๐ฏ 1. Zero-Friction Migration
The TextDB Advantage: Drop-in replacement for f:translate ViewHelper with automatic LLL import on first render.
<!-- Step 1: Change namespace only --> <textdb:translate key="LLL:EXT:my_ext/Resources/Private/Language/locallang.xlf:welcome" /> <!-- Step 2: Render page โ Automatic import to database --> <!-- Step 3: Switch to native syntax --> <textdb:textdb component="my-component" type="label" placeholder="welcome" />
Competitors: Require manual migration, complex import processes, or complete rewrites.
๐๏ธ 2. Hierarchical Organization
The TextDB Advantage: 4-level structure (Environment โ Component โ Type โ Placeholder) prevents chaos at scale.
Example: 500+ translations organized logically instead of 500 flat key-value pairs.
Competitors: Flat key-value structure becomes unmanageable beyond 100 translations.
โก 3. Non-Developer Empowerment
The TextDB Advantage: Product managers, translators, and editors update translations without:
- File system access
- Git knowledge
- Deployment pipelines
- Developer intervention
Competitors: Either require developer involvement (TYPO3 Core) or offer basic editing without advanced features (Snowbabel).
๐ 4. Production-Grade Quality
The TextDB Advantage:
- PHPStan level 10 static analysis
- 95%+ test coverage
- PSR-12 coding standards
- Modern PHP 8.2+ features (readonly properties, constructor promotion)
- Comprehensive CI/CD pipeline
Competitors: Lower code quality standards, outdated codebases, limited testing.
๐ 5. Developer Experience
The TextDB Advantage:
- Fast Apply-compatible: Token-optimized for AI-assisted development
- Modern Architecture: Dependency injection, final classes, strict types
- CLI Automation: Console commands for import workflows
- API-ready: Clean service layer for programmatic access
Competitors: Legacy architectures, limited CLI support, manual workflows.
๐ Requirements
- TYPO3: 13.4.0 - 13.99.99
- PHP: 8.2, 8.3, or 8.4
- PHP Extensions: zip, simplexml, libxml
- Composer: For installation and dependency management
๐ Installation
Install via Composer:
composer require netresearch/nr-textdb
Activate the extension in the TYPO3 Extension Manager or via CLI:
vendor/bin/typo3 extension:activate nr_textdb
โ๏ธ Configuration
Extension Configuration
Configure the extension in the TYPO3 backend:
- Navigate to Admin Tools โ Settings โ Extension Configuration
- Select nr_textdb
- Set the Storage PID where translations will be stored
- Optionally disable "Create if missing" feature
Storage Setup
Create a dedicated storage folder for your translations:
- Create a new page/folder in the TYPO3 page tree
- Note the page ID
- Set this ID in the extension configuration as the Storage PID
- (Optional) Create language overlays for the folder to enable the language switcher in TCA
๐ Usage
Backend Module
Access the TextDB module under Netresearch โ TextDB in the TYPO3 backend.
Key Features:
- List View: Browse and filter all translations
- Inline Editing: Click to edit translation values directly
- Filtering: Filter by component, type, or search in placeholders/values
- Pagination: Navigate through large translation sets
ViewHelper Usage
Use TextDB translations in your Fluid templates:
<!-- Add namespace declaration --> <html xmlns:textdb="http://typo3.org/ns/Netresearch/NrTextdb/ViewHelpers"> <!-- Use the ViewHelper --> <textdb:textdb component="my-component" type="label" placeholder="welcome.headline" />
ViewHelper Parameters:
component: Logical grouping (e.g., "checkout", "contact-form")type: Translation type (e.g., "label", "message", "error")placeholder: Unique identifier for the translation
๐ฅ Import & Export
Importing Translations
- Prepare an XLF file with the required structure (see below)
- Open the TextDB backend module
- Click Import
- Select your XLF file
- Check "Overwrite existing" if you want to update existing translations
- Click Import
XLF File Structure for English (source language):
<?xml version="1.0" encoding="utf-8" standalone="yes" ?> <xliff version="1.0"> <file source-language="en" datatype="plaintext" original="messages"> <header> <authorName>Your Name</authorName> <authorEmail>your@email.com</authorEmail> </header> <body> <trans-unit id="component|type|placeholder"> <source>Translation Value</source> </trans-unit> </body> </file> </xliff>
XLF File Structure for Other Languages:
<?xml version="1.0" encoding="utf-8" standalone="yes" ?> <xliff version="1.0"> <file source-language="en" datatype="plaintext" original="messages"> <header> <authorName>Your Name</authorName> <authorEmail>your@email.com</authorEmail> </header> <body> <trans-unit id="component|type|placeholder"> <target>รbersetzungswert</target> </trans-unit> </body> </file> </xliff>
File Naming Convention:
- English (default):
textdb_[name].xlf - Other languages:
[iso-code].textdb_[name].xlf(e.g.,de.textdb_labels.xlf)
Security Considerations
The XLF import functionality implements protection against XML External Entity (XXE) attacks:
- XXE Protection: Network access during XML parsing is blocked using the
LIBXML_NONETflag, preventing external entity resolution and SSRF attacks - PHP 8.0+ Compatible: External entity loading is disabled by default in PHP 8.0+, with
LIBXML_NONETproviding defense-in-depth security - Permission Requirements: Only backend users with appropriate permissions can import XLF files
- Best Practices:
- Review XLF files from untrusted sources before importing
- Monitor import operations in production environments
- Regularly update to the latest version to receive security updates
For more information about XXE vulnerabilities, see the OWASP XXE documentation.
Exporting Translations
- Open the TextDB backend module
- Apply filters (component, type) if needed
- Click "Export with current filter"
- A ZIP archive will be downloaded with XLF files for all languages
Note: Export includes all filtered translations, ignoring pagination.
๐ Migration from LLL Files
Migrate existing f:translate ViewHelpers to TextDB:
Step 1: Include TextDB ViewHelper
Add to your template:
xmlns:textdb="http://typo3.org/ns/Netresearch/NrTextdb/ViewHelpers"
Step 2: Set Component in Controller
use Netresearch\NrTextdb\ViewHelpers\TranslateViewHelper; // In your controller action TranslateViewHelper::$component = 'my-component';
Step 3: Replace ViewHelpers Temporarily
Replace f:translate with textdb:translate:
<!-- Before --> <f:translate key="LLL:EXT:my_ext:Resources/Private/Language/locallang.xlf:welcome" /> <!-- During migration --> <textdb:translate key="LLL:EXT:my_ext:Resources/Private/Language/locallang.xlf:welcome" />
Step 4: Render Templates
Access your frontend to trigger automatic import of translations into TextDB.
Step 5: Final Replacement
Replace all f:translate calls with textdb:textdb:
For tag syntax:
Search: <f:translate key="LLL:EXT:[^:]+:([^\"]+)"[^>]+>
Replace: <textdb:textdb component="my-component" placeholder="\1" type="label" />
For inline syntax:
Search: {f:translate\(key: 'LLL:EXT:[^:]+:([^\']+)'\)}
Replace: {textdb:textdb\({placeholder: '\1', component: 'my-component', type: 'label'})}
๐ ๏ธ Development
Running Tests
Run the complete test suite:
composer ci:test
This executes:
- โ PHP linting
- โ PHPStan static analysis (level 10)
- โ Rector code quality checks
- โ Fractor TYPO3 migrations
- โ Unit tests with coverage
- โ Coding standards (PHP CS Fixer)
Individual Test Commands
composer ci:test:php:lint # PHP linting composer ci:test:php:phpstan # PHPStan analysis composer ci:test:php:rector # Rector checks composer ci:test:php:fractor # Fractor checks composer ci:test:php:unit # Unit tests composer ci:test:php:cgl # Coding standards check
Automatic Fixes
composer ci:cgl # Fix coding standards composer ci:rector # Apply Rector refactorings composer ci:fractor # Apply Fractor migrations
๐ค Contributing
We welcome all types of contributions! Whether you're a developer, translator, or documentation writer, there's a way for you to help.
๐ Help Translate TextDB
Make TextDB available in your language! We use Crowdin for community translations.
The extension currently supports 23 languages, and we're always looking to add more:
๐ฟ๐ฆ Afrikaans โข ๐ธ๐ฆ Arabic โข ๐จ๐ฟ Czech โข ๐ฉ๐ฐ Danish โข ๐ฉ๐ช German โข ๐ช๐ธ Spanish โข ๐ซ๐ฎ Finnish โข ๐ซ๐ท French โข ๐ฎ๐ณ Hindi โข ๐ฎ๐ฉ Indonesian โข ๐ฎ๐น Italian โข ๐ฏ๐ต Japanese โข ๐ฐ๐ท Korean โข ๐ณ๐ฑ Dutch โข ๐ณ๐ด Norwegian โข ๐ต๐ฑ Polish โข ๐ต๐น Portuguese โข ๐ท๐บ Russian โข ๐ธ๐ช Swedish โข ๐น๐ฟ Swahili โข ๐น๐ญ Thai โข ๐ป๐ณ Vietnamese โข ๐จ๐ณ Chinese
How to contribute translations:
- Visit the TYPO3 Crowdin project: https://crowdin.com/project/typo3-cms
- Find the
nr_textdbextension - Select your language and start translating
- Your translations will be automatically synchronized
No technical knowledge required! See our Translation Guide for detailed instructions.
๐ป Contribute Code
- Fork the repository
- Create a feature branch (
git checkout -b feature/amazing-feature) - Make your changes following our coding standards
- Run tests:
composer ci:test - Open a Pull Request
Development Standards:
- PHPStan level 10 compliance required
- PSR-12 coding standards
declare(strict_types=1)in all PHP files- Type declarations on all methods
- Tests for new features
๐ Full Contributing Guide
For detailed information about:
- Translation guidelines and proper names
- Code contribution workflow
- Development setup with DDEV
- Testing and quality standards
- Issue reporting
See our CONTRIBUTING.md guide.
๐ License
This project is licensed under the GPL-3.0-or-later License - see the LICENSE file for details.
๐ข About Netresearch
Developed and maintained by Netresearch DTT GmbH
Authors:
- Thomas Schรถne
- Axel Seemann
- Tobias Hein
- Rico Sonntag
๐ Support
- Issues: GitHub Issues
- Discussions: GitHub Discussions
- TYPO3 Extension Repository: TER
- Company Website: netresearch.de
๐ Related Extensions
- nr-sync: Synchronize TextDB translations across TYPO3 instances
Made with โค๏ธ for the TYPO3 Community