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的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 PHP的 , , Pro Blogging赞成Blogging , , Programming编程 , , SEO徐 , , Translator Plugin Pro翻译插件亲 , , Web网页 , , Web 2.0 Web 2.0的 , , Web Services Web服务 , , WordPress在WordPress , , WordPress Plugin wordpress插件 | |
| |
RSS 2.0 2.0 | |
Trackback Trackback跟踪 this Article |此文章|
Email this Article电子邮件此文章
You may also like to read您也可以想读 |






September 19th, 2007 at 5:47 pm 2007年9月19日在下午5时47分
Angsuman,由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…我在去年的名称是\ ' dembowski \ '不dembowsky …
Jan Dembowski 1月dembowski
September 21st, 2007 at 3:57 am 2007年9月21日在上午03时57分
Corrected, thanks.纠正,感谢。
September 21st, 2007 at 11:14 am 2007年9月21日在上午11时14分
Blogroll Dive: 9/21/07… 博客链接下潜: 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… joen邸…