Uploaded image for project: 'translate5'
  1. translate5
  2. TRANSLATE-3321

InstantTranslate with DeepL: Detect source language automatically

    XMLWordPrintable

Details

    • High
    • ENHANCEMENT: InstantTranslate now supports auto-detection of the source language

    Description

      DeepL has - as many other MT engines - the ability to automatically detect the source language, that is typed into the text field of InstantTranslate.

      It should be implemented to use this for InstantTranslate.

      At the moment the mechanism should only be implemented for DeepL. If DeepL is not configured for InstantTranslate for the current user, it should not be offered.

      API call to be used: https://www.deepl.com/de/docs-api/translate-text/translate-text/

      In the GUI it should be implemented as follows

      As part of the source languages drop-down there should be a new language "Detect language".

      BUT: Only for the text field. Not for the file translation, since there the auto-detection will not be implemented.

      By default (if not configured otherwise) the new option "Detect language" should be pre-selected for the user.

      We will check, if DeepL checks the source language if you pass the source-lang as a param and tells you a different source-lang, if needed. If this works, we will implement a feedback in the GUI, that proposes the user to use a different source lang, if the languages differ.

      Configuration options

      So far the option runtimeOptions.InstantTranslate.user.defaultLanguages exists in Zf_configuration, that defines the pre-selected options.

      So far the configuration looks like

      {  "sourceLangDefault": "de",  "targetLangDefault": "en-US" }

      In the future it should look like we should add a boolean configuration

      setAutoDetectasDefault

      Caution: The mechanism to save the last selected language combinations should be set again

       

      while sourceLangTextfieldDefault now will also allow "auto-detect" as a value (needs to be documented).

      Detection mechanism

      DeepL API allows to detect the source language. This is possible with the translation request.

      So no additional request should be implemented from the front-end to translate5 or further on to DeepL, yet the existing mechanisms should be used to hook on.

      Also the architecture should be made in a way that easily allows to implement the feature for other MT engines too.

      Attachments

        Issue Links

          Activity

            People

              sanya@mittagqi.com Sanya Mikhliaiev
              marcmittag Marc Mittag [Administrator]
              Axel Becher, Leon Kiz
              Votes:
              0 Vote for this issue
              Watchers:
              2 Start watching this issue

              Dates

                Created:
                Updated:
                Resolved: