Mathias Brandewinder on .NET, F#, VSTO and Excel development, and quantitative analysis / machine learning.
by Mathias 7. September 2010 16:56

In my previous posts, I explored how to identify text in a PowerPoint slide and use the Google .NET API to translate it; let’s put it all together in a simple VSTO add-in for PowerPoint 2007.

The translation functionality is displayed in a Custom Task Pane, where you can pick the language of origin, and the language to translate to. I used the same general design I presented in my Excel add-in tutorial, using WPF controls in the task pane with the MVVM pattern, leveraging the small yet very useful MVVM foundation framework. When running, this is how the add-in looks like:

TranslatorStart

TranslatorEnd

I added only 3 languages in there, but it is fairly easy to modify the code and get it to work with any language pair supported by Google translate.

Download code sample

Comments

2/20/2012 7:44:11 AM #

Nathan Murray

Unfortunately this program will not work anymore Frown because it relies on google translator API v1 which is not available for free anymore, replaced by a pay for service in V2

code.google.com/.../getting_started.html

Damn, this would have been really really handy....Maybe the same thing could be modified to use Microsofts BING translator?

Nathan Murray United Kingdom | Reply

2/22/2012 2:13:43 PM #

Mathias

Hi Nathan,
You are right, unfortunately the Google API is not publicly/freely available anymore. I have written a version based on the BING API already, which works very nicely, but haven't gotten the time to publish it. Part of the issue is that there are limits on how many calls you can make with one key, and for that reason I can't put my own key out there like that. That being said, the API is very well documented, and the conversion isn't hugely complicated. I'd be happy to give pointers if needed!
Mathias

Mathias United States | Reply

Add comment




  Country flag

biuquote
  • Comment
  • Preview
Loading



Comments

Comment RSS