Getting Started
Step 1: Install the Plugin
Although it is a commercial plugin, you can download and test the plugin in your local environment before purchasing it.
Composer
The recommended way to install the plugin is via Composer. To install the plugin, run the following command in your terminal:
composer require johannschopplich/kirby-content-translator
Download
Head over to the releases page and download the latest version of the plugin as a ZIP file. Extract the contents of this ZIP file to your site/plugins
folder. It should look like this:
site/plugins/
├─ kirby-content-translator/
│ └─ … All plugin files
Step 2: Configure DeepL
By default, this plugin uses the DeepL API to translate your content. However, you can also use any other translation service by defining a custom translator function.
In order to use the DeepL API, you have to create an account and generate an API key. The free account is sufficient for most use cases (500,000 characters per month).
Store the API key in your config.php
file:
return [
'johannschopplich.content-translator' => [
// API key for the DeepL free or pro plan
'DeepL' => [
'apiKey' => '<deepl-api-key>'
]
]
];
Step 3: Blueprint Setup
Open a site, site, or page blueprint file where you want to add the Content Translator. Add the following section configuration to the blueprint file:
sections:
contentTranslator:
type: content-translator
This will add a new section to the Panel where you can import and translate content. Note that during the testing process, a license notice will be displayed below the translation buttons. You can remove this notice by purchasing a license.
Step 4: Translate Your Content
Open the Panel and navigate to the page where you added the Content Translator section. Select one of the secondary languages from the Kirby's language drop-down list. You will see two new buttons in the section: Import and Translate.
Click the Import button to copy the content from the default language to the currently active language.
Click the Translate button to translate the content of the freshly imported content (which is still in the default language) to the currently selected secondary language.
For more configuration options, see the Configuration guide.
Step 5: Buy a License
You can test the plugin locally. However, you need to purchase a license to use the plugin in production environments.
Visit the product page on Lemon Squeezy and purchase a license. Then, open any Panel page that contains the Content Translator section. Click the Activate link to open the activation form:
Enter the email you used for the purchase and the order number and hit the submit button. Done! Thanks for supporting our work. Once you activate your license, the section will look like this:
/site/config/.kirby-tools-licenses
file. Make sure to add this file to your .gitignore
file to keep your license key private.