This API is intended to help you to detect the language of any text you pass to it. Also, you will be able to dynamically translate the texts of your choice.
Just pass the text that you want to translate or detect the language from. You will be receiving either the language or the new text translated.
This API is ideal for those companies or users that receive traffic from around the globe.
This API will help you to display your content in the language of your preference so you offer different alternatives for different users.
Also, if you want to reach new audiences with your content, translating those texts will help you to reach that goal.
Besides API call limitations per month:
Language - ISO-639-1 Code
如果您有一段文本并且想确认它是哪种语言,请使用此端点。
只需传递文本,它将自动检测其语言。
输出 JSON 响应示例:
{
"data": {
"detections": [
[
{
"language": "ja",
"confidence": 1,
"isReliable": false
}
]
]
}
}语言检测器 - 端点功能
| 对象 | 描述 |
|---|---|
q |
[必需] Pass the text which you want to detect its language from. Max: 8k chars. |
{"data":{"detections":[[{"confidence":1,"language":"en","isReliable":false}]]}}
curl --location --request POST 'https://zylalabs.com/api/38/text+translation+and+language+detector+api/109/language+detector?q=Let's see if you can detect this language.' --header 'Authorization: Bearer YOUR_API_KEY'
将您想要的任何文本从源语言翻译成您选择的目标语言。
输入文本: 让我们看看这个端点是如何翻译这段文本的。
输出 JSON 响应示例 (法语):
{
"data": {
"translations": [
{
"translatedText": "Voyons comment ce point de terminaison traduit ce texte.",
"detectedSourceLanguage": "en"
}
]
}
}
翻译端点 - 端点功能
| 对象 | 描述 |
|---|---|
q |
[必需] The input text to translate. Repeat this parameter to perform translation operations on multiple text inputs. |
target |
[必需] The language to use for translation of the input text, set to one of the language codes listed in the INFO tab |
format |
可选 The format of the source text, in either HTML (default) or plain-text. A value of html indicates HTML and a value of text indicates plain-text. |
source |
可选 The language of the source text, set to one of the language codes listed in Language Support. If the source language is not specified, the API will attempt to detect the source language automatically and return it within the response. |
{"data":{"translations":[{"translatedText":"Controlla questo endpoint!","detectedSourceLanguage":"en"}]}}
curl --location --request POST 'https://zylalabs.com/api/38/text+translation+and+language+detector+api/110/translation+endpoint?q=Check this endpoint!&target=it&format=text&source=en' --header 'Authorization: Bearer YOUR_API_KEY'
| 标头 | 描述 |
|---|---|
授权
|
[必需] 应为 Bearer access_key. 订阅后,请查看上方的"您的 API 访问密钥"。 |
无长期承诺。随时升级、降级或取消。 免费试用包括最多 50 个请求。
语言检测端点返回输入文本的检测语言、置信度分数和可靠性状态 翻译端点返回翻译文本及输入的检测源语言
对于语言检测器,关键字段包括“语言”、“置信度”和“是否可靠”。对于翻译端点,关键字段是“翻译文本”和“检测到的源语言”
响应数据采用JSON格式结构。每个端点的输出包含一个“data”对象,其中包括用于检测或翻译的嵌套数组,使得解析和访问特定信息变得容易
语言检测器需要输入文本作为参数 翻译端点需要源文本和目标语言代码以指定翻译方向
用户可以通过提供不同的输入文本和使用各自的ISO-639-1代码指定各种目标语言来自定义请求,从而实现灵活的语言选项
常见的使用案例包括为国际观众翻译网站内容 检测用户生成内容中的语言 以及通过提供多语言响应来增强客户支持
数据准确性通过先进的算法得以保持,这些算法分析文本模式和上下文 定期更新和质量检查确保语言检测和翻译过程保持可靠
如果语言检测器返回低信心或空结果,请考虑提供更多上下文或更长的文本样本。对于翻译,请确保源文本清晰完整以提高输出质量
服务级别:
100%
响应时间:
287ms
服务级别:
100%
响应时间:
270ms
服务级别:
100%
响应时间:
1,164ms
服务级别:
100%
响应时间:
718ms
服务级别:
100%
响应时间:
1,658ms
服务级别:
100%
响应时间:
728ms
服务级别:
100%
响应时间:
373ms
服务级别:
100%
响应时间:
1,273ms
服务级别:
100%
响应时间:
726ms
服务级别:
100%
响应时间:
210ms