Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[DOCUMENTATION] Update documentation to latest #346

Closed
wants to merge 1 commit into from
Closed
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
1 change: 0 additions & 1 deletion .ddev/config.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -21,7 +21,6 @@ web_environment:
- typo3DatabasePassword=root
- typo3DatabaseUsername=root
nodejs_version: "16"
DEEPL_API_KEY: ""

# Key features of DDEV's config.yaml:

Expand Down
42 changes: 40 additions & 2 deletions Documentation/Administration/Configuration/Index.rst
Original file line number Diff line number Diff line change
Expand Up @@ -5,19 +5,57 @@
Configuration
=============

Set up API and formality
------------------------

.. attention::
Before using the DeepL API, you need to get an API key from your `DeepL Profile`_.

Go to :guilabel:`Admin Tools > Settings > Extension Configuration`.

Open the settings for :guilabel:`wv_deepltranslate` and add your API key.

The extension is set up to auto-detect the corresponding DeepL API URL.

.. _sitesetup:
Set up translation language
---------------------------

#. Go to :guilabel:`Site Management > Sites` and edit your site configuration
#. Switch to tab `Languages` and open your target
#. Go to :guilabel:`DeepL Settings` and set up your `Target Language (ISO Code)`
#. Save

.. note::
Although the dropdown can also be set in the standard language, it makes no sense
to define a target language for the source language.

Configure tables
----------------

If not default set, you need to define the `l10n_mode` for the fields you want to
have translatable by `wv_deepltranslate`.

See the :ref:`tableConfiguration<table configuration>` for details.

Detecting target language
-------------------------

From TYPO3 11.5 LTS on the detection of the target language works as following:
The following chain tries to detect the language to translate into:

#. Set up DeepL Translation language in SiteConfiguration
* Target languages detected from DeepL will only appear
#. Check hreflang against DeepL supported languages
* Needed for detecting EN-GB, EN-US, PT-PT or PT-BR
#. Fallback to Language ISO code

For currently allowed languages see the `DeepL conform language key`_. As this
extension retrieves available languages from the API, translations are restricted
to the languages listed in the official DeepL API documentation.

If none of these match against DeepL API, translation for this language
is disabled for usage within DeepL. Translation buttons and dropdowns
respect this setting.

.. _DeepL conform language key: https://www.deepl.com/de/docs-api/general/get-languages/
.. _DeepL conform language key: https://developers.deepl.com/docs/api-reference/languages
.. _DeepL Profile: https://www.deepl.com/en/your-account/keys
16 changes: 15 additions & 1 deletion Documentation/Administration/Updates/Index.rst
Original file line number Diff line number Diff line change
Expand Up @@ -2,11 +2,25 @@

.. _updates:

=======
Updates
=======

Version 3.x > 4.x
=================

If you are upgrading from 3.x on TYPO3 11 LTS to 12 LTS and you used site config
setup of translations, you simply can update.

Upgrade with Core Upgrade
-------------------------

If you upgrade fom TYPO3 below v11 you have to define the target languages in
the site configuration. See the :ref:`sitesetup<Site Setup section>` in this
documentation.

Version 2.x > 3.x
-----------------
=================

.. note:: This Upgrade is only needed, if you are using glossary functionality.

Expand Down
21 changes: 20 additions & 1 deletion Documentation/Faq/Index.rst
Original file line number Diff line number Diff line change
Expand Up @@ -5,8 +5,27 @@
FAQ
===

My dropdown in the site configuration is empty
----------------------------------------------

This happens, if TYPO3 cached the request from DeepL API for allowed languages
but no API key was provided. In this case, clear your system cache in TYPO3.
Normally no cache files should be created, when no API key is provided.

If this step does take no effect, delete the cached files manually. The location
is the following:

* composer based installation
`var/cache/data/wvdeepltranslate`
* legacy installation
`typo3temp/var/cache/data/wvdeepltranslate`

After deleting the files in this directory and going to Site configuration, the
extension loads the cache again and the dropdown should have all translatable
language keys.

What will be the cost for DeepL API subscription?
----------------------------------------------------------------
-------------------------------------------------

You can find all the details regarding DeepL API usage here:

Expand Down
5 changes: 3 additions & 2 deletions Documentation/Files/versionSupport.csv
Original file line number Diff line number Diff line change
@@ -1,2 +1,3 @@
2.3,9-11,>=7.4
3.0,9-11,>=7.4
"2.3","9-11",">=7.4"
"3.0","9-11",">=7.4"
"4.0-4.x","11-12","7.4, 8.0, 8.1, 8.2"
7 changes: 6 additions & 1 deletion Documentation/Reference/TableConfiguration/Index.rst
Original file line number Diff line number Diff line change
Expand Up @@ -10,6 +10,11 @@ Table Configuration
understands fields which need to be translated, only if their ``l10n_mode``
is set to ``prefixLangTitle``.

.. attention::
`wv_deepltranslate` only translates fields defined as TCA type `input` or `text`.
Other fields can currently not automatically translated due to limitations
in the DataHandler.

For detecting translatable fields, *wv_deepltranslate* uses a DataHandler hook.

The following setup is needed, to get *wv_deepltranslate* work on your table:
Expand All @@ -18,4 +23,4 @@ The following setup is needed, to get *wv_deepltranslate* work on your table:
:caption: <extension_key>/Configuration/TCA/Overrides/<table_name>.php

$GLOBALS['TCA']['<table_name>']['columns']['<field_name>']['l10n_mode'] = 'prefixLangTitle';
$GLOBALS['TCA']['<table_name>']['columns']['<field_name>']['l10n_mode'] = 'prefixLangTitle';
$GLOBALS['TCA']['<table_name>']['columns']['<another_field_name>']['l10n_mode'] = 'prefixLangTitle';