Translator Plugin Pro API User Tip: How To Show Custom Messages / Disclaimer on Translated Pages翻譯插件親的空氣污染指數用戶提示:如何顯示自訂訊息/聲明對翻譯的頁面
§ Translator Contents翻譯內容
Jan Dembowski uses 1月dembowski用途 Translator Plugin Pro翻譯插件親 for his WordPress blog, which provided him with a good traffic boost: “My web traffic went from 5,000 hits (900 visits) last week to 21,000 hits yesterday”.他WordPress所博客,向他提供了一個良好的交通增加: “我的網站流量從5000安打( 900訪問)上週以21000安打昨天” 。 He made a cool & informative sidebar element with他作出了冷靜與翔實的工具欄元素 Translator API翻譯的空氣污染指數 to indicate to his viewers of translated pages (only) that the page they are viewing has been translated using online services like Google or Babelfish.以顯示他的觀眾翻譯的頁面(只)表示,該網頁,他們正在檢視已被翻譯使用在線服務,例如Google或Babelfish平台。
Machine translation機器翻譯 cannot equal human translation with today’s technology.不能平等人翻譯與今天的技術。 However it is a simple & cheap way to provide a reasonable gist of your content for viewers who cannot understand the basic language of your blog.不過這是一個簡單及廉價的方式,以提供一個合理的精神,您的內容,為觀眾誰可以不明白的基本的語言,您的博客。 Not to mention that it can rapidly increase the traffic on your blog, fully ethically.更不用提,它可以迅速增加的交通在您的博客上,充分倫理道德。 His customization well manages the expectations of his non-English viewers (or viewers not conversant with the language of your blog).他的個性,以及管理的期望,他的非英語觀眾(或觀眾不熟悉的語言,您的博客) 。
Here is how he did it:這裡是如何,他沒有:
I just received version 5.01 of ATPP and it now adds the ability to check if the page is translated or not.我剛剛收到的版本5.01的atpp和現在的能力,增加了檢查,如果該網頁是翻譯或沒有。 With the inclusion of the following PHP code in your sidebar.php (or anywhere you’d like; I may change it) you can now warn your readers:與列入以下PHP代碼在您的sidebar.php (或任何您想要,我可能會改變它)現在,您可以提出警告,您的讀者:
Please note: This page was originally written in English.
The text has been translated using an online service such as Google or Babelfish.
$original=@$_SERVER['REQUEST_URI'];
?>The original post can be viewed ">here.
I wrapped it in a i它包裹在一個so that I can style it easily.好讓我能的作風,它很容易。 In my style.css file I added在我的style.css文件I補充說:
.trans-notice {
font-family: "Trebuchet MS", Georgia, Arial, serif;
font-size: 0.9em;
border:#ccc 1px solid;
background-color:#FAFAFA;
margin: 0 5px;
}
.trans-notice p {
margin: 7px;
}
This gives a warning in English…這提出警告,在英語…Thanks for sharing this code on your blog Jan. Hope you don’t mind me quoting it. 感謝分享此代碼在您的博客一月,希望你不介意我引用它。
You can read the您可以閱讀 detailed explanation詳細解釋 of the code from his blog entry.該守則,從他的博客條目。
We can further simplify and enhance the code as follows:我們可以進一步簡化和加強代碼如下:
Please note: This page was originally written in English.
The text has been translated using an online service such as Google or Babelfish.
The original post can be viewed here.
Please note: This page was originally written in English.
The text has been translated using an online service such as Google or Babelfish.
The original post can be viewed here.
The beauty of this modification is that using the API, not only you can inform your non-English viewers that they are viewing translated pages but do it in their own language as well as in English.美麗的這一修改是使用API ,而不是只有你可以告訴您的非英語觀眾表示,他們正在查看的頁面翻譯,但這樣做他們自己的語言,以及在英語。
After few iterations this is the final code I am currently using on this blog:經過幾年的反复,這是最後的代碼,我目前使用的就這個博客:
Please note: This page was originally written in English.
The original post can be viewed ">here.
Please note: This page was originally written in English.
The text has been translated using an online service such as Google or Babelfish.
The original post can be viewed ">here.
You can see a live example in the german version of this page..Feel free to reuse and modify this code as you please.
Filed under Google, Headline News, How To, PHP, Pro Blogging, Programming, SEO, Translator Plugin Pro, Web, Web 2.0, Web Services, WordPress, WordPress Plugin |
|
RSS 2.0 |
Trackback this Article
|
Email this Article
You may also like to read |




Add to Technorati Favorites
September 19th, 2007 at 5:47 pm
Angsuman,
By all means, feel free to share. I hope your readers find the code snippets useful. However I must correct one small technical item.
My last name is \’Dembowski\’ not Dembowsky…
Jan Dembowski
September 21st, 2007 at 3:57 am
Corrected, thanks.
September 21st, 2007 at 11:14 am
Blogroll Dive: 9/21/07…
Here are the highlights from today’s Blogroll dive:
Bryan shared “four tips for a better online buying experience”.
Michael discussed the human brain and how the observation of patterns leads to the accumulation of knowledge.
Joen di…