Connecting Tech Pros Worldwide Forums | Help | Site Map

How to set comboboxes in Google language translation form?

Newbie
 
Join Date: Oct 2008
Location: Mostly England
Posts: 1
#1: Oct 3 '08
Hello, I want to translate text dynamically from my VBA application with the Google translation tool.

I have already figured out how to send the original text (eg in English) to the 'original text field' (id in html is 'source').

QUESTION: How to set the from and to languages (combobox)?
I have spend several hours to find out how to set the 'from' and 'to' language. Without succes. Can anybody help me? It seems that these fields make a part of a more complex datastructure...

The relevant html can be found by:
1. Type http://www.google.nl/language_tools?hl=en
2. See the two comboboxes under 'Transate text'

VBA code I'm currently using to set the 'source' text:

Expand|Select|Wrap|Line Numbers
  1. Set ie = CreateObject("InternetExplorer.Application")
  2. ...
  3. ie.Document.All("source").Value = TxtbText.Value()
  4.  

Version VBA used: I'm using Office Excel 2003, SP2, part of office small business edition 2003

Currently my development is stuck on this, so I hope somebody can help me quickly, thank you,
SamJohn

!NoItAll's Avatar
Member
 
Join Date: May 2006
Location: Madison, Wi
Posts: 78
#2: Oct 4 '08

re: How to set comboboxes in Google language translation form?


Check out this blog:
http://blogs.msdn.com/shahpiyush/archive/2007/06/09/3188246.aspx

The only real issue is that you will have to screen scrape to get the result. That's often easier if you include something to delimit your text that is part of the text that won't get translated. Something like:
||# text to be translated # ||
This way the translated text will have the delimiters and will be easy to find.
Reply