powered by CADENAS

Manual

Manual

1.7.5.15.2.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