How to set comboboxes in Google language translation form?

Collapse
X
 
  • Time
  • Show
Clear All
new posts
  • SamJohn
    New Member
    • Oct 2008
    • 1

    How to set comboboxes in Google language translation form?

    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:

    Code:
    Set ie = CreateObject("InternetExplorer.Application")
    ...
    ie.Document.All("source").Value = TxtbText.Value()

    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
    Contributor
    • May 2006
    • 297

    #2
    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.

    Comment

    Working...