Download the PHP package digitalpulsebe/craft-deepl-translator without Composer
On this page you can find all versions of the php package digitalpulsebe/craft-deepl-translator. It is possible to download/install these versions without Composer. Possible dependencies are resolved automatically.
Download digitalpulsebe/craft-deepl-translator
More information about digitalpulsebe/craft-deepl-translator
Files in digitalpulsebe/craft-deepl-translator
Package craft-deepl-translator
Short Description Translate content of elements using the external services
License proprietary
Informations about the package craft-deepl-translator
Multi Translator
Translate your site content using Deepl, Google Translate or ChatGPT.
Requirements
This plugin requires Craft CMS 4 or Craft CMS 5.
Installation
You can install this plugin from the Plugin Store or with Composer.
From the Plugin Store
Go to the Plugin Store in your project’s Control Panel and search for “Multi Translator”. Then press “Install”.
With Composer
Open your terminal and run the following commands:
when using DDEV:
Translation Services
For now, we support these API services:
- Deepl - Create your account at Deepl to get an API Key
- with support for Glossaries
- Google Cloud Translation v2 - Create an API key in your Cloud Console
- Google Cloud Translation v3 - Create a Service Account your Cloud Console
- OpenAI (ChatGPT) - Create an API key in at OpenAI
- also supports any OpenAI-compatible endpoint (Azure OpenAI, Ollama, Groq, Mistral, Infomaniak AI Service, …)
OpenAI-compatible providers
The OpenAI API provider supports a configurable base URL and custom model name, allowing you to point it at any OpenAI-compatible endpoint.
| Setting | Description | Default |
|---|---|---|
| API Base URL | Base URL of the API endpoint | https://api.openai.com/v1 |
| API model | Model dropdown, or select "Custom" to enter a free-text model identifier | gpt-4o |
| Custom model name | Free-text model identifier (shown when "Custom" is selected) | — |
Both the base URL and model fields support Craft environment variables (e.g. $OPENAI_BASE_URL).
Example: Infomaniak AI Service
In your .env:
In the plugin settings: set Base URL to $OPENAI_BASE_URL, API Key to $OPENAI_API_KEY, select Custom as the model and enter e.g. mistral3 or qwen3.
Roadmap
Please let us know which API's and features are desired for this plugin!
Plugin Settings
Configure options in the Craft control panel settings
Permissions
For non-admin users, enable permissions under the 'Multi Translator' section:
- 'Manage settings'
- this will allow CMS users to enter an API key an edit general settings
- 'Translate Content'
- enables the element actions to translate one-by-one
- 'Translate Content in bulk (element action)'
- enables the bulk actions to translate one-by-one
Supported field types
- craft\fields\PlainText
- craft\fields\Table
- craft\redactor\Field
- craft\ckeditor\Field
- craft\fields\Link
- verbb\vizy\fields\VizyField
- craft\fields\Matrix (recursive)
- benf\neo\Field (recursive)
- verbb\supertable\fields\SuperTableField (recursive)
- verbb\hyper\fields\HyperField
- nystudio107\seomatic\fields\SeoSettings
- ether\seo\fields\SeoField
Usage
There are two ways to trigger a translation.
Translate one-by-one
- Navigate to the entry on the desired source site/language.
- Use the buttons in the sidebar and select the target language.
(you can reverse this flow by setting the default direction in the configuration)
Translate in bulk
- Navigate to overview of entries you want to get translated.
- Select the entries in the source language.
- Use the 'Translate to' dropdown in the actions bar and choose the target language
- A queue job will be started
Manage Glossaries
When using DeepL API, you can add a glossary for supported language pairs. When translating, the plugin will search a glossary for the appropriate source and target language. There can only be one glossary for each language pair.
DeepL style rules and custom instructions
When using the DeepL API, you can apply the style rules configured in your DeepL account. Style rules are created and edited in your DeepL account. On the Style Rules screen you can fetch them and enable one style rule per target language; when translating into that language, the plugin passes the style rule along.
You can also configure up to 10 free-text custom instructions (max 300 characters each) in the DeepL provider settings. They are applied when translating into the target languages supported by DeepL (German, English, Spanish, French, Italian, Japanese, Korean and Chinese).
Custom instructions require DeepL's next-generation language model. If the plugin is configured to use the classic model, translations using custom instructions are upgraded to the next-generation model automatically.
Extending with events
You can add your own logic by listening to these events:
The beforeElementTranslation event
Example:
The afterElementTranslation event
Example:
The beforeFieldTranslation event
Example:
The afterFieldTranslation event
Example:
Registering a custom API provider
The EVENT_REGISTER_API_PROVIDERS event on TranslateService lets you add your own translation provider without forking the plugin. This makes it possible to integrate services like Gemini, Claude, Azure AI, or any internal translator.
1. Create a provider class
Extend digitalpulsebe\craftmultitranslator\providers\Provider and implement the required methods:
Key points:
- Use
$this->getSetting(string $key, mixed $default)to read your own settings — providers only have access to their own settings slice and cannot read settings belonging to other providers. - Settings are stored in the database under
providers.{handle}and are injected automatically when the provider is instantiated. sourceLocale()andtargetLocale()helper methods are available from the base class for basic locale normalisation. Override them if your API expects a different format.
2. Create a settings template
The settings variable is your provider's own settings array.
3. Register the provider
Listen for EVENT_REGISTER_API_PROVIDERS in your plugin or module's init():
Once registered, the provider will appear in the API Provider dropdown in the plugin settings, and its settings template will be shown automatically when it is selected.
All versions of craft-deepl-translator with dependencies
deeplcom/deepl-php Version ^1.20
google/cloud-translate Version ^1.12
ext-dom Version *
ext-libxml Version *
ext-json Version *