<?xml version="1.0" encoding="UTF-8" ?>
<?xml-stylesheet type="text/xsl" href="http://weblogs.asp.net/utility/FeedStylesheets/rss.xsl" media="screen"?><rss version="2.0" xmlns:dc="http://purl.org/dc/elements/1.1/" xmlns:slash="http://purl.org/rss/1.0/modules/slash/" xmlns:wfw="http://wellformedweb.org/CommentAPI/"><channel><title>A Trip Through The .NET World : Web Services</title><link>http://weblogs.asp.net/eduardodias/archive/tags/Web+Services/default.aspx</link><description>Tags: Web Services</description><dc:language>en</dc:language><generator>CommunityServer 2007 SP1 (Build: 20510.895)</generator><item><title>Translating a text with a MineGoogleTranslator Web Control</title><link>http://weblogs.asp.net/eduardodias/archive/2008/01/24/translating-a-text-with-a-minegoogletranslator-web-control.aspx</link><pubDate>Thu, 24 Jan 2008 15:52:00 GMT</pubDate><guid isPermaLink="false">c06e2b9d-981a-45b4-a55f-ab0d8bbfdc1c:5643673</guid><dc:creator>edurdias</dc:creator><slash:comments>0</slash:comments><wfw:commentRss xmlns:wfw="http://wellformedweb.org/CommentAPI/">http://weblogs.asp.net/eduardodias/rsscomments.aspx?PostID=5643673</wfw:commentRss><comments>http://weblogs.asp.net/eduardodias/archive/2008/01/24/translating-a-text-with-a-minegoogletranslator-web-control.aspx#comments</comments><description>&lt;P&gt;The MineGoogleTranslator is a easy way to consume the Google Translation Service.&lt;/P&gt;
&lt;P&gt;&lt;STRONG&gt;&lt;/STRONG&gt;&lt;/P&gt;
&lt;P&gt;&lt;STRONG&gt;What is the MineGoogleTranslator?&lt;/STRONG&gt;&lt;/P&gt;
&lt;P&gt;This project catches the result of Google Translation Page and parses it through Regular Expressions. It contains three ways to consume:&lt;/P&gt;
&lt;UL&gt;
&lt;LI&gt;A small Windows application &lt;/LI&gt;
&lt;LI&gt;A Web Service &lt;/LI&gt;
&lt;LI&gt;A Web Control's collection &lt;/LI&gt;&lt;/UL&gt;
&lt;P&gt;As the MineGoogleTranslator is in development stage, its releases offer simple version of these features. Their roadmap contains features like a tray icon for the Windows Application and new Web Controls.&lt;/P&gt;
&lt;P&gt;&lt;STRONG&gt;&lt;/STRONG&gt;&lt;/P&gt;
&lt;P&gt;&lt;STRONG&gt;Using the WebControl&lt;/STRONG&gt;&lt;/P&gt;
&lt;P&gt;Add the project's reference to your project. After that you can add a control to your web page. &lt;/P&gt;
&lt;P&gt;&lt;STRONG&gt;Note&lt;/STRONG&gt;: The project contains a Web Application with a simple sample of the Web Controls usage.&lt;/P&gt;
&lt;P&gt;Your page must include the registration for the library:&lt;/P&gt;&lt;CODE&gt;&amp;lt;%@ Register &lt;BR&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; Assembly="MineGoogleTranslator.Web" &lt;BR&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; Namespace="MineGoogleTranslator.Web" &lt;BR&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; TagPrefix="mgt" %&amp;gt;&lt;/CODE&gt; 
&lt;P&gt;After registering the assembly, you just add the Web Control and configure it like this:&lt;/P&gt;
&lt;P&gt;&lt;CODE&gt;&amp;lt;mgt:TranslatorBox&amp;nbsp; &lt;BR&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; id="myTranslatorBox"&amp;nbsp; &lt;BR&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; runat="server"&amp;nbsp; &lt;BR&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; OriginalText="A simple text to translate."&amp;nbsp; &lt;BR&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; ButtonText="Translate It!"&amp;nbsp; &lt;BR&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; FromLanguage="en"&amp;nbsp; &lt;BR&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; ToLanguage="pt"&amp;gt; &lt;BR&gt;&amp;lt;/mgt:TranslatorBox&amp;gt;&lt;/CODE&gt; &lt;/P&gt;
&lt;P&gt;All the languages available in Google Translation Page will be available here. If a language pair isn't valid, the control will throw an exception.&lt;/P&gt;
&lt;P&gt;&lt;STRONG&gt;Note&lt;/STRONG&gt;: The Web Control has an event named Translate; you can handle it to get the translation result.&lt;/P&gt;
&lt;P&gt;And that's all, folks. Now you can add a translation service on your web site! :D&lt;/P&gt;
&lt;P&gt;&lt;STRONG&gt;More Informations&lt;/STRONG&gt;&lt;/P&gt;
&lt;P&gt;You can find more informations about the project &lt;A class="" href="http://www.codeplex.com/mgt" target=_blank mce_href="http://www.codeplex.com/mgt"&gt;here&lt;/A&gt;.&lt;/P&gt;&lt;img src="http://weblogs.asp.net/aggbug.aspx?PostID=5643673" width="1" height="1"&gt;</description><category domain="http://weblogs.asp.net/eduardodias/archive/tags/.net/default.aspx">.net</category><category domain="http://weblogs.asp.net/eduardodias/archive/tags/Web+Services/default.aspx">Web Services</category><category domain="http://weblogs.asp.net/eduardodias/archive/tags/General+Software+Development/default.aspx">General Software Development</category><category domain="http://weblogs.asp.net/eduardodias/archive/tags/ASP.NET/default.aspx">ASP.NET</category></item></channel></rss>