Translating a text with a MineGoogleTranslator Web Control

The MineGoogleTranslator is a easy way to consume the Google Translation Service.

What is the MineGoogleTranslator?

This project catches the result of Google Translation Page and parses it through Regular Expressions. It contains three ways to consume:

  • A small Windows application
  • A Web Service
  • A Web Control's collection

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.

Using the WebControl

Add the project's reference to your project. After that you can add a control to your web page.

Note: The project contains a Web Application with a simple sample of the Web Controls usage.

Your page must include the registration for the library:

<%@ Register
    Assembly="MineGoogleTranslator.Web"
    Namespace="MineGoogleTranslator.Web"
    TagPrefix="mgt" %>

After registering the assembly, you just add the Web Control and configure it like this:

<mgt:TranslatorBox 
    id="myTranslatorBox" 
    runat="server" 
    OriginalText="A simple text to translate." 
    ButtonText="Translate It!" 
    FromLanguage="en" 
    ToLanguage="pt">
</mgt:TranslatorBox>

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.

Note: The Web Control has an event named Translate; you can handle it to get the translation result.

And that's all, folks. Now you can add a translation service on your web site! :D

More Informations

You can find more informations about the project here.

Published Thursday, January 24, 2008 12:52 PM by edurdias

Comments

# re: Translating a text with a MineGoogleTranslator Web Control

Wednesday, January 30, 2008 5:20 AM by JM

está muito bom o webservice,mas estou com problemas quando quero fazer tradução de caracteres acentuados,por exemplo não consigo traduzir avião de PT para EN,aparece com caracteres ilegiveis.O que fazer para corrigir o problema?

English (by edurdias):

The web service is very good, but I'm with problems when I wanna do a translation of characters with accent. For exemplo, I cannot translate "avião" from PT to EN, show as ilegible characters. What to do to fix the problem?

# re: Translating a text with a MineGoogleTranslator Web Control

Wednesday, January 30, 2008 7:43 AM by edurdias

Ola JM, verifique o release que vocês obteve. O último release tem esta correção e melhorias no web control.

English:

Hi JM, verify what release you got. The latest release already has this bug fixed and some improvements in the web control.

# re: Translating a text with a MineGoogleTranslator Web Control

Thursday, January 31, 2008 6:12 AM by JM

Obrigado pela resposta Eduardo,a release que estou a usar é a 0.2.0 - Babel Tower,alterei a codificação UTF7 para UTF8 mas continua a não funcionar.

English (by edurdias): Thank you Eduardo by the answer, I'm using the 0.2.0 - Babel Tower release, I changed the UTF7 encoding to UTF8, but still not working.

# re: Translating a text with a MineGoogleTranslator Web Control

Thursday, January 31, 2008 7:01 AM by edurdias

Ola JM, estarei verificando bug e corrigindo-o, peço que notifique isto pelo enderço www.codeplex.com/.../Create.aspx.

English:

Hi JM, I'll verifying and fixing it, I ask you to notify creating a Issue at www.codeplex.com/.../Create.aspx

# re: Translating a text with a MineGoogleTranslator Web Control

Thursday, January 31, 2008 7:30 AM by JM

Criei então a issue,espero que consiga resolver o problema,fico com expectativa a aguardar uma solução.cumprimentos

English (by edurdias) I created the Issue and hope that you can solve the problem. I'm waiting for the solution. Regards.

# re: Translating a text with a MineGoogleTranslator Web Control

Monday, February 04, 2008 5:13 AM by JM

A tradução de Inglês para Português está bem,por exemplo se traduzir Airplane para Português dá Avião,até aqui tudo bem,mas Avião de Português para Inglês não dá Airplane, mas sim Avià £ o

 
English (by edurdias):

The translation from English to Portuguese is ok. For example, if I translate Airplane to Portuguese I got Avião, but if I translate from Portuguese to English, the result isn't Airplane, but Avià £ o.

# re: Translating a text with a MineGoogleTranslator Web Control

Tuesday, March 11, 2008 6:16 AM by spider

Eu também me deparei com o problema da tradução das palavras com acentos :(

# Translating a text with a MineGoogleTranslator Web Control

Friday, August 08, 2008 10:19 AM by Eduardo Dias

Translating a text with a MineGoogleTranslator Web Control

Leave a Comment

(required) 
(required) 
(optional)
(required)