SofaDoc

SofaDoc Map Usage

inc/deepl.php

Provides functions to connect to DeepL translation service.
Define your API key in $swDeeplKey or $swDeeplFree (if you use the free API)
Supported languages: de, en, es, fr, it
Basic. Tags and errors are not handled

Functions

swTranslate($text,$source,$target)

Translates some text from a source to a target language
@param $text
@param $source language iso2 code
@param $target language iso2 code

swTranslateUsage()

Returns character count and character limit of the DeepL translation service.

Globals

$swDeeplFree, $swDeeplKey, $swTranslateLanguages

Variables

$character_count, $character_limit, $encoded, $fields, $result, $server, $source, $target, $text

Short variables: $ch

Features

array, curl, json, url