<?xml version="1.0" encoding="UTF-8"?>
<rss version="2.0" xmlns:atom="http://www.w3.org/2005/Atom" xmlns:dc="http://purl.org/dc/elements/1.1/">
  <channel>
    <title>DEV Community: Lingvanex</title>
    <description>The latest articles on DEV Community by Lingvanex (@lingvanex).</description>
    <link>https://dev.to/lingvanex</link>
    <image>
      <url>https://media2.dev.to/dynamic/image/width=90,height=90,fit=cover,gravity=auto,format=auto/https:%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Fuser%2Fprofile_image%2F1826039%2F4ed24371-d1eb-4d32-b59f-171729a9bb15.png</url>
      <title>DEV Community: Lingvanex</title>
      <link>https://dev.to/lingvanex</link>
    </image>
    <atom:link rel="self" type="application/rss+xml" href="https://dev.to/feed/lingvanex"/>
    <language>en</language>
    <item>
      <title>Lingvanex API</title>
      <dc:creator>Lingvanex</dc:creator>
      <pubDate>Wed, 24 Jul 2024 07:22:41 +0000</pubDate>
      <link>https://dev.to/lingvanex/lingvanex-api-5fp2</link>
      <guid>https://dev.to/lingvanex/lingvanex-api-5fp2</guid>
      <description>&lt;p&gt;&lt;strong&gt;Lingvanex API&lt;/strong&gt;&lt;/p&gt;

&lt;p&gt;Discover the Power of Lingvanex Translator Service&lt;/p&gt;

&lt;p&gt;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.&lt;/p&gt;

&lt;p&gt;With Lingvanex, you can effortlessly translate both text and HTML pages, enhancing your global reach and communication capabilities. Explore the capabilities of the &lt;a href="https://lingvanex.com/translationapi/" rel="noopener noreferrer"&gt;Lingvanex Cloud API&lt;/a&gt; and learn more about our &lt;a href="https://lingvanex.com/" rel="noopener noreferrer"&gt; Secure On-Premise Machine Translation&lt;/a&gt;.&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;How to get the authentication key&lt;/strong&gt;&lt;br&gt;
Before using the API you need to create the &lt;a href="https://lingvanex.com/account/" rel="noopener noreferrer"&gt;account &lt;/a&gt; and then generate the API key at the bottom of the page. You must use this authorization key to authorize requests.&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;Installation&lt;/strong&gt;&lt;br&gt;
You can install the library with PyPI using pip:&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;pip install lingvanex
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;&lt;strong&gt;Requirements&lt;/strong&gt;&lt;br&gt;
Python version &amp;gt;= 3.6&lt;br&gt;
Requests module version &amp;gt;= 2.0&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;Getting the list of languages&lt;/strong&gt;&lt;br&gt;
To retrieve the list of languages, perform a GET request with the authentication key as follows:&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;import requests

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

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

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

print(response.text)
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;Options:&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;
&lt;code&gt;url&lt;/code&gt;: &lt;a href="https://api-b2b.backenster.com/b1/api/v3/getLanguages" rel="noopener noreferrer"&gt;https://api-b2b.backenster.com/b1/api/v3/getLanguages&lt;/a&gt;
&lt;/li&gt;
&lt;li&gt;&lt;p&gt;&lt;code&gt;platform&lt;/code&gt;: api&lt;/p&gt;&lt;/li&gt;
&lt;li&gt;&lt;p&gt;&lt;code&gt;Authorization&lt;/code&gt;: The key must be obtained in advance&lt;/p&gt;&lt;/li&gt;
&lt;li&gt;&lt;p&gt;&lt;code&gt;code&lt;/code&gt;: 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.&lt;/p&gt;&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;&lt;strong&gt;Translate&lt;/strong&gt;&lt;br&gt;
This POST method translates text and HTML single string or arrays with the authentication key. Also it performs transliteration, language auto detection.&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;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)
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;Options:&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;
&lt;code&gt;url&lt;/code&gt;: &lt;a href="https://api-b2b.backenster.com/b1/api/v3/translate" rel="noopener noreferrer"&gt;https://api-b2b.backenster.com/b1/api/v3/translate&lt;/a&gt;
&lt;/li&gt;
&lt;li&gt;
&lt;code&gt;platform&lt;/code&gt;: api&lt;/li&gt;
&lt;li&gt;
&lt;code&gt;Authorization&lt;/code&gt;: The key must be obtained in advance&lt;/li&gt;
&lt;li&gt;
&lt;code&gt;from&lt;/code&gt;: 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.&lt;/li&gt;
&lt;li&gt;
&lt;code&gt;to&lt;/code&gt;: language code in the format “language code_code of the country” to which the text is translated (required)&lt;/li&gt;
&lt;li&gt;
&lt;code&gt;data&lt;/code&gt;: data for translation.&lt;/li&gt;
&lt;li&gt;
&lt;code&gt;translateMode&lt;/code&gt;: 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.&lt;/li&gt;
&lt;li&gt;
&lt;code&gt;enableTransliteration&lt;/code&gt;: If true response includes sourceTransliteration and targetTransliteration fields.&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;&lt;strong&gt;Issues&lt;/strong&gt;&lt;br&gt;
If you are having problems using the library, please &lt;a href="https://lingvanex.com/contact-us/" rel="noopener noreferrer"&gt;contact&lt;/a&gt; us.&lt;/p&gt;

</description>
    </item>
  </channel>
</rss>
