关于翻译API的查询 [英] Query Regarding Translation API
问题描述
我正在使用Microsoft Translator API(Microsoft Azure MarketPlace)。
I am using Microsoft Translator API (Microsoft Azure MarketPlace).
提到获取访问令牌。通过访问令牌我们需要翻译API。
There is a mention of getting Access Token. Through Access Token We need to translator API.
我怀疑生成的访问令牌是保持不变还是每次都要更改翻译。
I have a doubt whether generated access token will remain constant or going to change each time for translation.
我处于两难境地,我可以将整个html字符串转换为其他语言,或者我每次都需要传递控制明智的文本吗?
I am in a dilemma that can I convert whole html string into other language at Once or I need to pass control wise text each time?
推荐答案
感谢您提出问题Karpit
Thank you for your question Karpit
您需要访问令牌以及您对翻译员的每次API调用
You require the Access Token with each API call you make to the Translator
访问令牌将在生成后的10分钟后过期。为了获得新的访问令牌,您需要使用您的客户端ID和客户端密钥调用令牌服务。
The Access Token will expire after a time period of 10 minutes after it is generated. In order to get a new Access Token, you need to make a call to the token service with your client id and client secret.
有一个代码示例,说明如何执行此操作以及更多有关在此处生成访问令牌的信息 - http://msdn.microsoft.com/en-us/library/hh454950.aspx
There is a code sample of how to do this and more information about generating Access Tokens here - http://msdn.microsoft.com/en-us/library/hh454950.aspx
此致,
Tanvi Surti
Tanvi Surti
微软翻译项目经理
这篇关于关于翻译API的查询的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!