|
| 1 | +.. include:: ../Includes.rst.txt |
| 2 | + |
| 3 | +.. _users-manual: |
| 4 | + |
| 5 | +Users manual |
| 6 | +============ |
| 7 | + |
| 8 | +Translating content elements |
| 9 | +---------------------------- |
| 10 | + |
| 11 | +Once the extension is installed and API key provided, we are good to go for |
| 12 | +translating content elements. On translating content element, there appears |
| 13 | +additional four options apart from normal translate and copy. |
| 14 | + |
| 15 | +* Deepl Translate(auto detect). |
| 16 | +* Deepl Translate. |
| 17 | +* Google Translate(auto detect). |
| 18 | +* Google Translate. |
| 19 | + |
| 20 | +.. figure:: ../Images/UserManual/deepl.png |
| 21 | + :height: 450px |
| 22 | + :alt: Deepl Options |
| 23 | + |
| 24 | + Deepl translate options |
| 25 | + |
| 26 | +.. figure:: ../Images/UserManual/google.png |
| 27 | + :height: 450px |
| 28 | + :alt: Google Options |
| 29 | + |
| 30 | + Google translate options |
| 31 | + |
| 32 | +Deepl Module Settings |
| 33 | +------------------------------- |
| 34 | + |
| 35 | +The settings module helps to assign the system languages to either DeepL |
| 36 | +supported languages or to Google supported languages. |
| 37 | + |
| 38 | +For example you can assign German to Austrian German sys language if you wish. |
| 39 | +For assigning a language to a sys language you must enter it's iso code (ISO 639-1). |
| 40 | + |
| 41 | +.. figure:: ../Images/UserManual/settings.png |
| 42 | + :width: 800px |
| 43 | + :alt: Settings |
| 44 | + |
| 45 | + Module Settings |
| 46 | + |
| 47 | +Translating TCA Records |
| 48 | +----------------------- |
| 49 | + |
| 50 | +Deepltranslate supports translation of specific fields of TCA records. It |
| 51 | +understands fields which need to be translated, only if their ``l10n_mode`` |
| 52 | +is set to ``prefixLangTitle``. |
| 53 | + |
| 54 | +Example |
| 55 | +------- |
| 56 | + |
| 57 | +Translating fields from ``tx_news`` |
| 58 | +^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ |
| 59 | + |
| 60 | +Add the fields, you want to auto translate to TCA/Overrides: |
| 61 | +``EXT:sitepackage/Configuration/TCA/Overrides/tx_news_domain_model_news.php`` |
| 62 | + |
| 63 | +.. code-block:: php |
| 64 | +
|
| 65 | + $GLOBALS['TCA']['tx_news_domain_model_news']['columns']['bodytext']['l10n_mode'] = 'prefixLangTitle'; |
| 66 | + $GLOBALS['TCA']['tx_news_domain_model_news']['columns']['teaser']['l10n_mode'] = 'prefixLangTitle'; |
0 commit comments