|
51099在线学习网 http://www.51099.com用了这么久GOOGLE才知道原来他可以翻译网站的。 下面给出一段代码 | Code: | | <script language="javascript"> document.write('<A href="http://translate.google.com/translate?sl=en&hl=de&u=' document.URL '"><IMG width=22 height=12 alt="Translate this page to German" src="img/de.gif" border="0"></A> '); document.write('<A href="http://translate.google.com/translate?sl=en&hl=fr&u=' document.URL '"><IMG width=22 height=12 alt="Translate this page to French" src="img/fr.gif" border="0"></A> '); document.write('<A href="http://translate.google.com/translate?sl=en&hl=it&u=' document.URL '"><IMG width=22 height=12 alt="Translate this page to Italian" src="img/it.gif" border="0"></A> '); document.write('<A href="http://translate.google.com/translate?sl=en&hl=es&u=' document.URL '"><IMG width=22 height=12 alt="Translate this page to Spanish" src="img/es.gif" border="0"></A> '); document.write('<A href="http://translate.google.com/translate?sl=en&hl=pt&u=' document.URL '"><IMG width=22 height=12 alt="Translate this page to Portuguese" src="img/pt.gif" border="0"></A> '); document.write('<A href="http://translate.google.com/translate?sl=en&hl=ru&u=' document.URL '"><IMG width=22 height=12 alt="Translate this page to Russian" src="img/ru.gif" border="0"></A> '); </script> |
|
图片包下载: http://free1.e-168.cn/~sf/img.zip 在插入代码的网页的同级目录下建立img目录将图片复制进去即可~ 只要将以上代码插入你的英文网站就可以轻松实现整站翻译的效果,下面来对这个翻译的连接注释一下! | Code: | | | http://translate.google.com/translate?sl=en&hl=de&u=' document.URL ' |
| 红字sl=en:你网站的当前语言 篮字hl=de:你要翻译的语种 绿字' document.URL ':这里表示读取当前连接,你也可以修改成自己的想要翻译的地址 这个地址表示把当前的英文网站翻译成德语网站 世界上虽然很多国家但是常用的语言也就那么几个,因为大多被殖民过了,所以我们不要翻译很多。下面我把常用的各国语言的在GOOGLE上的翻译连接上的缩写给大家罗列一些。 zh-CN简体中文,zh-TW繁体中文,en英文,fr法国语,de德语,pt葡萄牙语,it意大利语,es西班牙语,ru俄语 这些就是基本长用的了如果你想翻译更多语言可以到http://www.google.com/language_tools?hl=zh-CN 去查一下各国语言的google缩写。 注意:我自己实验中,把中文翻译成其他语言或者把其他语言翻译成中文都不好使,几乎都是乱码,所以这个可能只适用于E文网站。 下面是一个成品演示。 http://www.proxycn.net 51099在线学习网 http://www.51099.com
|