English to Lithuanian Translation with GroupDocs.Translation Cloud API using Curl
GroupDocs.Translation Cloud API is a powerful tool for translating text from one language to another. With a simple curl request, you can use the API to translate English text to Lithuanian, allowing you to easily localize and communicate with Lithuanian-speaking audiences. The API also supports various other languages and provides accurate and reliable translations, making it a valuable resource for businesses and individuals looking to break down language barriers and expand their global reach.
// Get your App SID, App Key and Storage Name at https://dashboard.groupdocs.cloud (free registration is required).
public TextResponse TranslateText(Configuration conf)
{
string pair = "en-lt";
string text = "English to Lithuanian Translation with GroupDocs.Translation Cloud API using Curl";
TranslationApi api = new TranslationApi(conf);
TranslateTextRequest request = api.CreateTextRequest(pair, text);
TextResponse response = api.RunTranslationTextTask(request);
return response;
}
# Get your App SID, App Key and Storage Name at https://dashboard.groupdocs.cloud (free registration is required).
curl -X POST "https://api.groupdocs.cloud/v1.0/translation/text" \
-H "Authorization: Bearer TOKEN" \
-H "Content-Type: application/json" \
-d '[{"pair":"en-lt", "text":"English to Lithuanian Translation with GroupDocs.Translation Cloud API using Curl"}]'
# and response
{ "status":"ok", "message":"Text translated successfully", "translation":"....." }
// Get your App SID, App Key and Storage Name at https://dashboard.groupdocs.cloud (free registration is required).
import com.GroupDocs.translate.api.*;
import com.GroupDocs.translate.Configuration;
private static void setUpConfig() throws Exception {
Configuration.setAPP_SID("XXXXXXXX-XXXX-XXXX-XXXX-XXXXXXXXXXXX");
Configuration.setAPI_KEY("XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX");
}
static String TranslateText() {
pair = "en-lt";
text = "English to Lithuanian Translation with GroupDocs.Translation Cloud API using Curl";
TextInfo textInfo = new TextInfo(pair, text);
TranslationTextRequest translationTextRequest = new TranslationTextRequest(TextInfo.toString());
TranslationTextResponse translateTextResponse = TranslationApi.TranslateText(translationTextRequest);
return translateTextResponse.translation;
}
# Get your App SID, App Key and Storage Name at https://dashboard.groupdocs.cloud (free registration is required).
from groupdocstranslationcloud.configuration import Configuration
from groupdocstranslationcloud.api.translation_api import TranslationApi
from groupdocstranslationcloud.models.translate_text import TranslateText
from groupdocstranslationcloud.models.translate_document import TranslateDocument
# enter valid apiKey and appSid
configuration = Configuration(apiKey="", appSid="")
api = TranslationApi(configuration)
pair = "en-lt"
text = "English to Lithuanian Translation with GroupDocs.Translation Cloud API using Curl"
translator = TranslateText(pair, text)
response = translator.to_string()
res_text = api.post_translate_text(response)
print(res_text.translation)
Features
Translation
GroupDocs.Translation Cloud allows users to translate documents, texts, and strings from one language to another. It supports translation for multiple languages including English to Lithuanian.
Translation Direction
The API supports translation from English to Lithuanian and vice versa, as well as many other language pairs.
Curl Support
GroupDocs.Translation Cloud API provides support for curl, allowing users to easily integrate the translation functionality into their applications using HTTP requests.
Authentication
The API requires authentication to access the translation services. Upon authentication, users receive a token that must be included in the HTTP requests to access the translation functionality.
Translation Accuracy
GroupDocs.Translation Cloud uses advanced translation algorithms to ensure accurate and natural translations from English to Lithuanian and other language pairs.