Translating for fun and... fun...
- Posted: Apr 06, 2011 at 6:00 AM
- 7,677 Views
- 4 Comments
Loading User Information from Channel 9
Something went wrong getting user information from Channel 9
Loading User Information from MSDN
Something went wrong getting user information from MSDN
Loading Visual Studio Achievements
Something went wrong getting the Visual Studio Achievements
Our world is a pretty small place and getting smaller. As a developer, I'd like to make it easier for my users to use my apps, to speak to them in their own language, so to speak.
But that's hard. Getting someone to translate your app, web page, etc can be a pain. And while the community has jumped in in many cases to help out some projects, that's still a hit or miss kind of thing.
That's why I wanted to highlight the Microsoft Translator and show you a couple ways it could be used...
Translation is a tool, not a destination. Following up on this philosophy, Microsoft Translator developer offerings provide developers a wide spectrum of translation and language APIs for integration into their applications and services. ...
So okay, we have an API. Next? How can this help me, the "do I code or do I sleep" developer?
How about using this service, in part, to automatically translate your Resource files?
This project is a .net Windows Form/Console Application that allows automatic translation of RESX files using Bing's translation web services.
This is a good example of how to use Bing web services and how to work with RESX files.
Lets say we start with Resource file with English strings;
Now, let's translate this into Russian...
And of course you get all the source to see how it's all done...
NOTE: To use this project you'll need to sign up, for free, your own AppID from http://www.bing.com/developers/createapp.aspx which is really quick and easy;
Once you've got your AppID, you can use the API in your own, non-commercial, apps, in the RESX Translator with Bing, etc.
For example, just because I could and thought the API call "Speak" was interesting ("Returns a string which is a URL to a wave stream of the passed-in text being spoken in the desired language") I knocked some throw away code to play with it...
And that's it (plus a Service Reference to http://api.microsofttranslator.com/V2/Soap.svc )
What's hilarious is that there's an accent with each language. That if you feed it an English phrase and you set the language to French ("fr") you'll get it back as English, but with a French accent! Not sure if that's an easter egg, but it's pretty funny.
If you just want to play with it a bit and see the API in action, there's even an Microsoft Translator Interactive SDK available
You'd think that translation could seem a little boring but once I started playing with it it was actually kind of fun...