+$And both of them are free... until 1 December 2011. That's when Google will start charging. This article describes how to implement both of these, and how to switch from Google to Microsoft.
+$Google Translate API
+$Google has been building up its translation database for years. In 2007 it switched from a rules based approach to+$a data analysis approach+$. It essentially looked at bucket loads of multi-lingual example documents, and matched up the translated words and sentences. This is unlike systems like Yahoo's BabelFish, which is based on linguistic rules.
+$Google currently offers 52 languages, and a public URL (+$www.google.com/translate+$) where anybody can use the service to translate text between languages.
+$Eventually, website owners wanted this service on their own websites. So in 2008+$Google offered its first Translate API+$. The Translate API grew and grew in popularity, so much so that in May of this year, Google announced that “+$due to the substantial economic burden caused by extensive abuse” it would be turned off+$. This caused an outcry, so Google backtracked and decided to+$keep the API but make it chargeable from 1 December 2011+$. It Will Cost+$$20 Per Million Characters+$of text. Note that this charge only applies to the API – the public translation service above will remain free.
+$Alternatives to Google Translate
+$There are several alternatives to Google. The biggest competitor is probably Microsoft, whose public facing translation service is called+$Bing Translator+$and offers 28 languages. Although it is hard to find a strenuous review of translation quality, many bloggers feel that Microsoft does match up to Google for quality. This article will therefore focus on Microsoft's Translator API.
+$There are other services available, which will not be covered in this article. Yahoo's BabelFish is still a way behind for quality and does not seem to offer an API. Other alternative APIs are+$MyGengo和+$SpeakLike。
+$Coding the Google Translate API Version 1
+$Google Translate API has 2 versions.+$Version 1+$was deprecated 26 May 2011 and will be shut off completely on 1 December 2011. Even if you intend to pay Google for future translation services, you will still need to migrate away from this code, either to Google Translate API Version 2 or Microsoft Translator API. The code for version 1 is shown below, mainly so you can understand how it works. There is little point to actually implementing this as it will only be active for another month.
+$First of all, create a basic HTML form used for all the examples below. When the Translate button is pressed, it calls the function GoogleTranslateStart, passing in the text to be translated and the language to translate to. The onsubmit returns false to prevent the form from actually submitting.
+$Coding the Google Translate API Version 2
+$Version 2+$uses a different method (called REST) and will be chargeable from 1 December. To use it, you'll need a Google login and API key. Once logged in, click More from the menu at the top, then Even More, then Code in the top-right. Click APIs Console on the left, then API Access. You will be able to request an API key to insert into the code below.
+$Coding the Microsoft Translator API
+$Microsoft's Translator API+$can also use the REST method, so the code looks very similar to Google Translate API Version 2. You first need to get a+$Windows Live ID+$, which you should then insert into the code below.
+$Switching from Google to Microsoft
+$If not, then switching from Google Translate API Version 1 involves finding the function in your code, which calls google.language.translate, and replacing it with MicrosoftTranslateStart above, passing the text to be translated and the target language as arguments.
+$Switching from Google Translate API Version 2 to Microsoft Translator API is more direct. You just need to find the function which creates the new