powered by CADENAS

Manual

Manual

5.8.2.1.13.5. Configuration of the Online Translation Services

Some translation services are already preconfigured and ready to use so that no changes are necessary.[28]

You can add other services in the configuration file any time.

In the following the structure of the configuration file is described in detail.

5.8.2.1.13.5.1. Integration mode of translation service

There are two modes of translation services:

  • Services which provide an API:

    • Microsoft Translator

    • Google Translator

    At these services the translation proposals are read directly from the API and displayed in the Translate term dialog on the Translation suggestions tabbed page.

    [Note] Note

    However the user has to deliver a key which is inserted in the configuration file. How to get the key is described under Section 5.8.2.1.13.5.3, “ Google Translator - Create account” and Section 5.8.2.1.13.5.4, “ Microsoft Translator - Create account”.

  • Services which are addressed by an URL:

    • Podge

    • Leo

    • Beolingus

    • IATE

    • Linguee

    In order to use these services only an URL is needed. The results display happens in the Translate term dialog on the Web view tabbed page.

5.8.2.1.13.5.2. Structure of configuration file

The settings for every translation service are made in its own section.

Every section can contain the following keys:

  • SourceLanguages and TargetLanguages:

    Comma separated list of supported source and target languages.

    The language has to be set using the ISO code.

    Example:

    SourceLanguages=af,aq,ar,be,bg,ca,de,en
    TargetLanguages=af,aq,ar,be,bg,ca,de,en

  • WebUrl_sourceLang_targetLang:

    This key provides the display on the Web view tabbed page.

    Each language combination has to be declared separately.

    The key has to be adjusted for each translation service individually.

    General form::

    WebUrl_sourceLanguage_targetLanguage=

    Example:

    WebUrl_de_en=http://dict.leo.org/ende?lp=ende&search=$phrase.
    WebUrl_en_de=http://dict.leo.org/ende?lp=ende&search=$phrase.
    WebUrl_all_all=http://www.podge.de/..........................
    WebUrl_de_all=http://dict.tu-chemnitz.de/....................

    A language code can be replaced by "all".

Google and Microsoft have two keys in addition:

URL addressed services have the following key in addition:

  • Description:

    Name/description of the service which is displayed in the UI in the Translator list field.

    Description text in the "Translator" list field

    Description text in the "Translator" list field

    The description text can be localized via configuration file under ../setup/online_translation.def.

  • UrlEncoding:

    For some translation services an URL encoding has to be defined in order for the parameters to be transferred correctly (e.g. "Service.de/translate?query=Überlauf").

    Example:

    UrlEncoding=ISO 8859-1

The following place holders can be used in the WebUrl and ServiceUrl keys:

  • $phrase.: The text to be translated

  • $source_lang.: The source language

  • $desired_lang.: The desired target language

  • $key.: The key for Google Translator or Microsoft Translator

5.8.2.1.13.5.3.  Google Translator - Create account

In order to be able to use the Google Translator a key has to be inserted in the online_translators.cfg configuration file, in the [GoogleTranslator] section. The other settings are already made by default and do not have to be changed

In order to get the key a Google Account is needed.

In order to create it proceed as follows:

  1. Call up http://code.google.com/apis/console.

  2. Click on "Create an account now".

  3. Insert the requested data in the form.

  4. You receive an activation e-mail.

  5. Click on the activation link in the e-mail.

  6. Now log in with your password.

  7. Activate "Translate API".

    Translate API

    Translate API

    [Note] Note

    With this key 100.000 characters a day can be translated.

  8. In the "Identity" category you see your key under "Current key".

    Current key

    Current key

  9. Copy this key to the online_translators.cfg configuration file, to the [GoogleTranslator] section, into "Key".

    [GoogleTranslator]
    Key=............................

5.8.2.1.13.5.4.  Microsoft Translator - Create account

In order to be able to use the Microsoft Translator a key has to be inserted in the online_translators.cfg configuration file, in the [MicrosoftTranslator] section. The other settings are already made by default and do not have to be changed

In order to get the key an "AppID" is needed. The "AppID" corresponds to the needed key.

In order to get it proceed as follows:

  1. Call up http://www.bing.com/developers/appids.aspx.

  2. Click on "Register".

  3. Insert the requested data in the form.

  4. You receive an activation e-mail

  5. Click on the activation link in the e-mail.

  6. Now log in with your e-mail address and your password.

  7. Click on the link "Get started by applying for an AppID now".

    Get started by applying for an AppID now

    Get started by applying for an AppID now

  8. Again insert the requested data in the form and finally click on Agree.

  9. Under "Application name and AppID" you see your ID / your key.

    Copy ID / key

    Copy ID / key

  10. Copy this key to the online_translators.cfg configuration file, to the [MicrosoftTranslator] section into "Key".

    [MicrosoftTranslator]
    Key=....................................



[28] Only for GoogleTranslator and MicrosoftTranslator you have to insert a key named "Key". See under Section 5.8.2.1.13.5.3, “ Google Translator - Create account” and Section 5.8.2.1.13.5.4, “ Microsoft Translator - Create account”.