Olivier Fontana, Microsoft translator Product strategy directorThe world is getting smaller, global collaboration, common innovation has become the norm. At Microsoft Research, we are particularly sympathetic to this – from Beijing to Redmond, Cambridge to Bangalore, and borderless communication and collaboration across the globe is a
First step: Prepare a Microsoft accountto use the Microsoft Translator API, you need to sign in to your Microsoft Azure Marketplace (https://datamarket.azure.com/home.) account. If you do not have a Microsoft account, go to login.
I've drawn a picture here to show the business logicBefore we call Microsoft Translator Server, we need to get a token, and this token is valid for 10 minutes. The following table lists the required parameters and the description for the
Parameters
Describe
client_id
Required, refers to the client ID of the application you registered in Azuzre
Client_s
supported features of the demo;Trial interface4 Creating an AppGo to App ManagementClick to register the app, for the later use, only those two items are needed;5. External trial API, save the following code to xxx.htm;Use your browser to open xxx.htm, fill in the app's client ID andClient Secret, click Submit, return, put Accesstoken fill, text input to translate, click Get can see the results in Console.log, there is need to change console.log to a
: Http://fanyi.youdao.com/openapi.do? keyfrom=type=datadoctype=q= The text to be translated A very standard get form of data transmission, want to see the results of a friend can directly apply for key after the link to the browser to copy the address bar, open, you can see the data back, remember that the data type must be UTF8, but also URL transcoding oh.Dragon to a PHP demo for reference:functionSimple_translate ($sentence){ $url _sentence=
Public stringAppID ="their own appid."; Public stringQ ="the text to translate"; Public stringSalt ="1435660288"; Public stringKey ="your secret key."; Public string from="your source language, such as zh"; Public stringto ="languages to be translated such as En"; Public stringGetjson () {varClient =NewRestclient ("http://api.fanyi.baidu.com"); varRequest =NewRestrequest ("/api/trans/vip/translate",
Http://api.fanyi.baidu.com/api/trans/product/desktopThis is the application interface address, which will get a appid and a key secretthen download the corresponding code for PHPThere is a PHP file that changes the values of the two static variables to use theIf you use this method, it is OK, $from is the type of language to translate, Chinese is of course Chinese$to is to translate into what language, the
Hi Big Ben's win10 UAP Development Preview version finally out, this update with 8.1 change is not very big, but the original win8.1 and WP8.1UAP of the sub-project form, instead of integration into a project, after a compilation packaged into a appx package, to achieve a seamless cross-platform.Each platform-specific API becomes the extension API, the followingBelow, take the WP unique fallback
"Register" button in the new page:7: Fill in the relevant information, click Create. (The client ID is the API account, the client key is the API password)8: Subscribe to the Microsoft Translator API. Click the "Data" menu in the
Package Microsoft Oxford Program API Client
The Oxford Program API is made up of a base URL, service name, parameter group service, mostly post (I haven't finished reading it yet), many of which are strings, but also have streaming formatting (like uploading pictures or something), Our projectoxfordclienthelper is to plan to encapsulate the implementation of the
The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion;
products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the
content of the page makes you feel confusing, please write us an email, we will handle the problem
within 5 days after receiving your email.
If you find any instances of plagiarism from the community, please send an email to:
info-contact@alibabacloud.com
and provide relevant evidence. A staff member will contact you within 5 working days.