Introduction
The Kirby Content Translator plugin empowers editors to translate content from one language to another. Translations can be done either language by language or in batches. The tool seamlessly integrates with the Kirby Panel and provides manual translation capabilities and programmatic access via its PHP API.
Key Features
- ๐๏ธ Panel Integration: Direct translation from the Kirby Panel with view buttons and blueprint sections.
- ๐ Multiple Translation Services: Built-in DeepL support with option for custom translation providers.
- ๐งฉ Structure-Aware: Translates complex field types including blocks, layouts, structures, and objects.
- ๐ท๏ธ KirbyTags Support: Selective translation of KirbyTags attributes while preserving UUIDs, URLs and other technical content.
- โก PHP API: Programmatic translation capabilities for automation and CLI commands.
- ๐ฆ Batch Translation: Translate content to multiple languages simultaneously.
- ๐ช Hooks System: Customize translation behavior with before/after hooks.
Translation Modes
Kirby Content Translator operates in two distinct modes depending on your current language context. This allows for both interactive, real-time translations in the Kirby Panel and efficient batch processing on the server side.
Feature | Per-Language Translation | Batch Translation |
---|---|---|
Language Context | ๐ Secondary language | ๐ Primary/default language |
Translation Speed | โก Real-time, instant | ๐ Batch processing |
Reversibility | โ Reversible changes | โ Non-reversible |
Interactivity | โ See & edit immediately | โ Background processing |
Target Languages | ๐ฏ Single language | ๐ Multiple languages at once |
Use Case | ๐ง Fine-tuning translations | ๐๏ธ Initial content creation |
Usage Overview
The plugin provides two main ways to translate content:
- Panel Integration: Use view buttons or blueprint sections to translate content directly in the Kirby Panel.
- PHP API: Programmatically translate content using PHP methods for automation or CLI commands.
Translation Services
By default, the plugin uses the DeepL API for high-quality translations. If you prefer to use a different translation service, you can define custom translation functions to integrate other providers.