谷歌翻译加入网站 [英] Google Translator Add In Website

查看:100
本文介绍了谷歌翻译加入网站的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

如何在网站上添加谷歌翻译器????

Plz发送m链接或任何有用的代码....

提前谢谢..

How To Add Google Translator in Website????
Plz send m link Or any helpful code ....
Thanks in advance..

推荐答案





看看这里:

http://dotnetaid.com/how-to-implement-google-translator-api-in- asp-net / [ ^ ]

http://weblogs.asp.net/jalpeshpvadgama/archive/2010/05/18/google-translation-api-integration-in-net.aspx [ ^ ]







如果你想翻译一个完整的页面,试试这个:

Hi,

Have a look here:
http://dotnetaid.com/how-to-implement-google-translator-api-in-asp-net/[^]
http://weblogs.asp.net/jalpeshpvadgama/archive/2010/05/18/google-translation-api-integration-in-net.aspx[^]



If you want to translate a complete page, try this:
protected void Page_Load(object sender, EventArgs e)
{
      string originalLanguage = "en"; // change this into the original language of your page
      string newLanguage = "nl"; // change this into the language in which you want to translate your page
      string newLocation = String.Format("http://translate.google.com/translate?sl={0}&tl={1}&u={2}", originalLanguage, newLanguage, Request.Url.AbsoluteUri);
      Response.Redirect(newLocation);
}



如果这样做,您可以将用户重定向到翻译网页内容的Google翻译页面。



希望这会有所帮助。


If you do this, you redirect your users to the Google Translate page that translates the content of your web page.

Hope this helps.


看到这个.. :)



Google Translator [ ^ ]



尝试在Google上搜索更多帮助.. :)
see this..:)

Google Translator[^]

try to search on Google for more help..:)


这篇关于谷歌翻译加入网站的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆