Skip to main content

Lingvanex API instructions

Project description

Lingvanex API

Discover the Power of Lingvanex Translator Service

Unlock the potential of your applications with Lingvanex Translator, a cutting-edge cloud-based neural machine translation service. Compatible with any operating system, Lingvanex Translator enables the creation of intelligent, multi-lingual solutions for all supported languages.

With Lingvanex, you can effortlessly translate both text and HTML pages, enhancing your global reach and communication capabilities. Explore the capabilities of the Lingvanex Cloud API and learn more about our Secure On-Premise Machine Translation.

How to get the authentication key

Before using the API you need to create the account and then generate the API key at the bottom of the page. You must use this authorization key to authorize requests.

Installation

You can install the library with PyPI using pip:

pip install lingvanex

Requirements

Python version >= 3.6
Requests module version >= 2.0

Getting the list of languages

To retrieve the list of languages, perform a GET request with the authentication key as follows:

import requests

url = "https://api-b2b.backenster.com/b1/api/v3/getLanguages?platform=api&code=en_GB"

headers = {"accept": "application/json"}

response = requests.get(url, headers=headers)

print(response.text)

Options:

  • url: https://api-b2b.backenster.com/b1/api/v3/getLanguages
  • platform: api
  • Authorization: The key must be obtained in advance
  • code: the language code in the format “language code_code of the country”, which is used to display the names of the languages. The language code is represented only in lowercase letters, the country code only in uppercase letters (example en_GB, es_ES, ru_RU etc). If this option is not present, then English is used by default.

Translate

This POST method translates text and HTML single string or arrays with the authentication key. Also it performs transliteration, language auto detection.

import requests

url = "https://api-b2b.backenster.com/b1/api/v3/translate"

payload = {
    "platform": "api",
    "from": "en_GB",
    "to": "de_DE",
    "data": "Some text",
    "translateMode": "html",
    "enableTransliteration": True
}
headers = {
    "accept": "application/json",
    "content-type": "application/json"
}

response = requests.post(url, json=payload, headers=headers)

print(response.text)

Options:

  • url: https://api-b2b.backenster.com/b1/api/v3/translate
  • platform: api
  • Authorization: The key must be obtained in advance
  • from: the language code in the format “language code_code of the country” from which the text is translated. The language code is represented only in lowercase letters, the country code only in uppercase letters (example en_GB, es_ES, ru_RU and etc.). If this parameter is not present, the auto-detect language mode is enabled.
  • to: language code in the format “language code_code of the country” to which the text is translated (required)
  • data: data for translation.
  • translateMode: Describe the input text format. Possible value is "html" for translating and preserving html structure. If value is not specified or is other than "html" than plain text is translating.
  • enableTransliteration: If true response includes sourceTransliteration and targetTransliteration fields.

Issues

If you are having problems using the library, please contact us.

Project details


Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distribution

lingvanex-0.0.11.tar.gz (3.9 kB view details)

Uploaded Source

Built Distribution

If you're not sure about the file name format, learn more about wheel file names.

lingvanex-0.0.11-py3-none-any.whl (3.5 kB view details)

Uploaded Python 3

File details

Details for the file lingvanex-0.0.11.tar.gz.

File metadata

  • Download URL: lingvanex-0.0.11.tar.gz
  • Upload date:
  • Size: 3.9 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/5.1.0 CPython/3.10.12

File hashes

Hashes for lingvanex-0.0.11.tar.gz
Algorithm Hash digest
SHA256 3dcd813a2bfb4775e4bedef27cd3eee300becab38c54a43279eb06d363b2037e
MD5 ec3dda2765db71db82eb21be31728d73
BLAKE2b-256 df93436111aff3eb95e912e56d53d83f6011e632b516bf13ef7eb8a8a5d0b326

See more details on using hashes here.

File details

Details for the file lingvanex-0.0.11-py3-none-any.whl.

File metadata

  • Download URL: lingvanex-0.0.11-py3-none-any.whl
  • Upload date:
  • Size: 3.5 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/5.1.0 CPython/3.10.12

File hashes

Hashes for lingvanex-0.0.11-py3-none-any.whl
Algorithm Hash digest
SHA256 253a6183c6fbbd11c6c6e0d6c04f02e10164134e96d2edff14226820673fe3e9
MD5 b5f2e988a1fad54db3953335ffc4579c
BLAKE2b-256 463d000721e39d56290df33fafdcf2c756ac70490b06eb22c788e3803cfa78cd

See more details on using hashes here.

Supported by

AWS Cloud computing and Security Sponsor Datadog Monitoring Depot Continuous Integration Fastly CDN Google Download Analytics Pingdom Monitoring Sentry Error logging StatusPage Status page