每一個可以努力的日子,都是一份厚禮。
Microsoft AJAX Translation WordPress Plugin
The Microsoft AJAX Translation WordPress plugin offers a “Translate” button that allows readers to translate your blog’s posts into a specified language with a quick, light ajax call to the Microsoft Translator API.
Why Microsoft AJAX Translation?
As of December 1, 2011, Google Translate API v1 is no longer available; it was officially deprecated due to the substantial economic burden. Google Translate API v2 is now available as a paid service only, and the number of requests your application can make per day is limited.
This is dramatic news. All of those “free” programs that hitchhiked on Google Translate are history. A lot of wordpress plugins that depended on the free Google Translation Engine also not work any more.
Fortunately, Microsoft still provide a free translation API for programmer. That’s why I decide to develop this plugin, which uses Microsoft Translator API. It is a surprisingly adequate substitute for Google Translate.
Screenshots
Features
- 38 languages supported. Powered by Microsoft’s state-of-the-art statistical machine translation system.
- Detects your source language automatically. If your source text changes to more than one language it may get confused.
- Detects visitor’s language automatically. Show the translate button in your readers’ prefered language according to their broswer UA.
- AJAX translation. Better user experience as no refresh is needed.
- On demand translation. The plugin can translate just the content of the post, and full page translation is also supported.
- Flexible to exclude certain posts and pages. Even a section of a page can be excluded from being translated by a jQuery selector.
Installation
- Download the plugin archive and expand it.
- Upload the `microsoft-ajax-translation` folder into your `wp-content/plugins/` directory.
- Activate the plugin.
- Get a Microsoft Bing Application ID – it’s free and takes only two minutes.
- Fill in your AppID in Options -> Microsoft Translation, then save changes of settings.
- Enjoy with your blog readers.
Frequently Asked Questions
Why an AppID is needed?
In order to avoid extensive abuse, Microsoft requires you to include a valid API key when you make programmatic calls to the translation APIs.
How can I get an AppID?
It is free and takes only two minutes.
1. Go to http://bing.com/developers, then click “Create your AppID”.
2. Sign up with your Windows Live ID.
3. Click “Get a new App ID”.
4. Fill in some basic info and submit.
5. Congratulations! You get your AppID, which is long string and you can use it in this plugin.
Can I customize the position of Translate button?
Yes. You can position the “Translate” button anywhere within the WordPress loop as shown below:
<?php if( method_exists( $MicrosoftTranslation, 'microsoft_ajax_translate_button' ) ) { $MicrosoftTranslation -> microsoft_ajax_translate_button(); } ?> |
Can I translate the whole page?
Yes. Just click the “powered by bing” image on the translate popup, and your reader will get a full translated website.
Why is the quality of the translation not as good as I would like it to be?
You should understand that the translation your reader sees is raw machine translation. Currently, it still requires human skills to translate sentences without errors.
Translation not working?
- Have you filled in your AppID in the settings page?
- There are so many visitors requesting translation that Microsoft suspended your AppID.
- This plugin automatically uses the jQuery library supplied by your WordPress installation. If your theme or another plugin has another copy of jQuery hard coded into it this plugin may not work.
- Ask here or in the wordpress forums.
Credits
This plugin is forked from the Google AJAX Translation wordpress plugin. Thanks Libin, alquanto and monodistortion for their previous work.
This plugin uses the jquery-translate plugin and the Microsoft Translator API .
Changelog
0.1.1
- Fix bug: The website may be messed up with missing and misplaced tags in the translation if the original HTML is not well formatted.
0.1.0
- Initial Release
Donation
If you think this wordpress plugin is useful and you derive benefit from it, you may want to bought me a cup of coffee. Your support is the motivation of my development.
Thanks to:
Konrad Czerniak, donated $1.00 USD.
Edvar dos Santos, donated $5.00 USD.
Related Links:
這篇文章由lovelucy於2012-03-02 18:31發表在編程。你可以訂閱RSS 2.0 也可以發表評論或引用到你的網站。除特殊說明外文章均為本人原創,並遵從署名-非商業性使用-相同方式共享創作協議,轉載或使用請註明作者和來源,尊重知識分享。 |
批評不自由
則讚美無意義
你好,我想在博客上實現跟你的博客一樣的繁簡體轉換功能,請問應該怎麼做?我下載了你寫的這個插件,但是現在好像不怎麼管用了。
微軟改變了策略,我沒有再繼續維護這個插件了。
現在用的是 wikipedia 的繁簡轉換庫。你可以試試這個 wordpress 插件:WP Chinese Conversion
你做的? 😛
嗯,歡迎試用哈
自坐沙發。
微軟翻譯的質量明顯不如Google。另外HTML標籤亦各種錯亂, ❓ 看看怎麼解決這bug……