DeepL API usage information
character_count: Number of characters translated this month
character_limit: Maximum number of characters that can be translated this month
If character_limit is 0, it is unlimited
ConnectionError
It is an error that occurs when communicating with the DeepL API. BadRequest: 400 Bad Request Forbidden: 403 Forbidden NotFound: 404 Not Found RequestEntityTooLarge: 413 Request Entity Too Large TooManyRequests: 429 Too Many Requests UnprocessableEntity: 456 Unprocessable Entity ServiceUnavailable: 503 Service Unavailable CurlError: Curl Error UnknownError: Unknown Error
DeepL API error. ConnectionError: Connection error occurred in the process of sending and receiving data. JsonError: Error occurred while parsing json. LimitError: The translation limit of your account has been reached. Consider upgrading your subscription. GetLanguageCodesError: Could not get language codes.
Errors that can occur in this library. DeeplApiError: DeepL API error InvalidLanguageCode: Invalid language code ApiKeyIsNotSet: API key is not set NoTargetLanguageSpecified: No target language specified CouldNotGetInputText: Could not get input text
Convert to correct language code from input source language code string. Using DeepL API.
api_key: DeepL API key
language_code: Language code to convert
Caution: EN, PT are not automatically converted to EN-US, PT-PT from version 2.1.0.
Convert to correct language code from input target language code string. Using DeepL API.
api_key: DeepL API key
language_code: Language code to convert
Caution: EN, PT are not automatically converted to EN-US, PT-PT from version 2.1.0.
Get the number of characters remaining to be translated. Using DeepL API.
Retrieved from https://api-free.deepl.com/v2/usage.
Returns an error if acquisition fails.
api_key: DeepL API key
Display translation results. Using DeepL API.
Receive translation results in json format and display translation results.
Return error if json parsing fails.
api_key: DeepL API key
text: Text to translate
target_lang: Target language
source_lang: Source language (optional)