每一个可以努力的日子,都是一份厚礼。
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……