dreistein / d-translate
LLM-based translation for TYPO3: translates pages and records into your site languages through TYPO3's own localize path (Anthropic Claude, OpenAI, Mistral or Google Gemini).
Package info
github.com/JojoLeon/d-translate
Language:Python
Type:typo3-cms-extension
pkg:composer/dreistein/d-translate
Requires
- php: ^8.2
- typo3/cms-backend: ^12.4 || ^13.4 || ^14.0
- typo3/cms-core: ^12.4 || ^13.4 || ^14.0
Requires (Dev)
None
Suggests
- typo3/cms-scheduler: Run the translation queue as a scheduler task instead of a cron entry.
Provides
None
Conflicts
None
Replaces
None
README
Translates pages and records into your site languages with a large language model β through TYPO3's own localize path, so translations behave like ones made by hand.
π Full manual, examples and screenshots β www.dreistein.de/dtranslate
Requirements
TYPO3 12.4, 13.4 or 14.0 Β· PHP 8.2+ Β· an API key for Anthropic, OpenAI, Mistral or Google Gemini.
Installation
composer require dreistein/d-translate
Activate the extension and run the database comparison.
Setup (once)
Both are plain records on the root level (Web β Records, page id 0):
- LLM configuration β provider, model and API key. The API base URL fills
in by itself when you pick the provider. For OpenAI-compatible gateways such
as Azure AI Foundry, enter the base URL (
https://<resource>.services.ai.azure.com/openai/v1) and the deployment name as model; a pasted full URL ending in/chat/completionsis shortened to the base URL on save. - Translation profile β the LLM configuration to use, the register (formal/informal), an optional style hint and glossary. Tick the sites it applies to, or tick none to make it the default for every site.
For background runs, call the worker from cron (every minute is fine):
vendor/bin/typo3 dtranslate:work --time-limit=50
If you already run the TYPO3 scheduler, add the task dTRANSLATE: Process translation queue instead and let it run every minute β one or the other, not both.
Translating
Open Web β Translation and pick a page in the page tree:
- Choose the translation profile (pre-selected from the site).
- Tick the target languages β only the languages of that page's site are offered.
- Tick the records to translate. An unticked container skips its whole group; inline children (IRRE, ContentBlocks, file references) always travel with their parent.
- Options: Publish translated page immediately and Process in the background.
- Translate selection.
A run is split into one unit per record and language. Without background processing you watch it live; with it, the worker takes over and you can close the page. Recent runs shows state, progress and what each run consumed β plus a cancel link while it is still open.
Running a translation again refreshes it; nothing is ever deleted by a run.
The page record travels with its content: title and SEO fields are translated,
the slug is rebuilt from the translated title (not translated) β also for a
translation created by hand or by an import that still carries the source slug.
Links to content elements (t3://page?uid=β¦#β¦) are pointed at the translated
element, so jump links work on sites that render their translations in free
mode too.
Repairing translations made earlier
Translations that exist already β from an earlier version, an editor's Translate click or an import β keep their source-language anchors and copied slugs until a run touches their page. The repair for a whole site needs no LLM:
vendor/bin/typo3 dtranslate:remap-anchors --dry-run # every site, list only vendor/bin/typo3 dtranslate:remap-anchors --site=main --slugs # one site, slugs too vendor/bin/typo3 dtranslate:remap-anchors --page=42 --slugs # one page
Without --dry-run the anchors are written straight to the records (the page
cache is cleared). --slugs rebuilds the slug of every page translation whose
slug is still byte-identical to the source page's, from its translated title;
a title not translated yet ([Translate to β¦]) is left alone and reported.
The slugs go through the DataHandler, so EXT:redirects β if installed and
allowed by the site's settings β creates its redirects from the old URLs and
moves subpages along, exactly as for a change in the page properties.
--language limits a run to one language id, --site and --page take
several values.
Glossary
Term pairs ("keep Streamer as Streamer") are handed to the model with
every request. An entry belongs to a profile or to every profile, and applies
to every target language, to a language (en β every English variant on
every site), to a regional variant (en-GB) or to a single site language id.
The most specific entry wins when several name the same term.
Entries are managed in Web β Translation β Glossary: a paged list per profile (plus one for the shared entries) with search and a language filter; each entry opens in the standard record form. The profile form only links there, so it opens quickly however many terms a glossary has.
A glossary that grew one entry per regional variant can be collapsed:
vendor/bin/typo3 dtranslate:glossary-consolidate --dry-run vendor/bin/typo3 dtranslate:glossary-consolidate --merge-profiles
Languages
Backend in English (source) plus 38 translations, following the backend user's language.
Support and manual
The detailed manual β profiles, glossaries, large runs, multi-site setups and troubleshooting β lives at www.dreistein.de/dtranslate.
License
GPL-2.0-or-later β Β© Joachim Dreistein Medienentwicklung, DΓΌsseldorf Β· www.dreistein.de