Fork of deepltranslate from pitsolutions. This extension provides option to translate content elements and tca record fields to desired language(supported by DeepL). As a fallback, Google Translate option is also provided as they provide support for many languages that DeepL isn’t providing. For both DeepL translate and Google Translate, there are two modes-normal and autodetect, where the later autodetect source language and translates it to the desired language.
You can install the extension using:
- Extension manager
- or composer
composer req web-vision/wv_deepltranslate
Once installed ,there appears a DeepL back end module with a settings tab.
Once you installed the extension, you have to set the DeepL API Key under extension configuration section
Once the extension is installed and Api key provided we are good to go for translating content elements. On translating content element,There appears additional four options apart from normal translate and copy.
- DeepL Translate(auto detect).
- DeepL Translate.
- Google Translate(auto detect).
- Google Translate.
wv_deepltranslate supports translation of specific fields of TCA records.It understands fields which need to be translated,
only if their l10n_mode
is set to prefixLangTitle
. For example if you need translation of fields of tx_news (teaser and bodytext),
You need to override those fields like follows:
Add it to TCA/Overrides:
example-extension/Configuration/TCA/Overrides/tx_news_domain_model_news.php
<?php
if (!defined('TYPO3_MODE')) {
die();
}
$GLOBALS['TCA']['tx_news_domain_model_news']['columns']['bodytext']['l10n_mode'] = 'prefixLangTitle';
$GLOBALS['TCA']['tx_news_domain_model_news']['columns']['teaser']['l10n_mode'] = 'prefixLangTitle';
For the perfect working of wv_deepltranslate with editor users , we need to make sure that the editor has some necessary permissions in Access Lists
.
Make sure editors have the following permissions:
- Tables (modify) - Better provide permission to all core tables and necessary third party extension tables.
- Allowed excludefields
- Page Content - Atleast provide permissions to
Columns (colPos)
,Language (sys_language_uid)
andTransl.Orig (l18n_parent)
- Other Tca record fields
Explicitly allow/deny field values
- Page Content: Type - Allow all to use all CE types.
The settings module helps to assign the sytem languages to either DeepL supported languages or to Google supported languages. For example, you can assign German under Austrian German sys language if you wish. For assigning a language to a sys language you must enter it’s isocode(ISO 639-1).
After setting up the core languages create a standard page in page tree.
- In the "Behavior" tab select the option DeepL Glossar in Contains Plugin options.
- Now you can create DeepL Glossary records on that page. Go to the list module and Create a new record, select the DeepL Glossaries record.
- Here you can enter the Term and Description for you Glossary entry and add the Translation term how it should be handled by DeepL translate.
- As soon as you have an entry in the glossary it will be considered by DeepL Translation for the pair language.
See faq here
We appreciate very much the sponsorships of the developments and features for the DeepL Translate Extension for TYPO3.