I’m working on one consulting project in Silverlight and it had lots of localization features to be done, I had to construct the English language so that was easy. After that it was the turn for converting this RESX to 4 other languages, By the thought of doing it line-by-line I was more sleepy and lazy!
I did remember that once Dr. Don Syme had shown some samples of using Bing translator in JAOO tutorials. Quickly took that sample source and looked over it for 5 mins to get this working in this use case. Then it hardly took 20 mins to put up a script file and get my work done, that was the sweet spot, I did the below things,
- Connected to BING API service “async”hronously
- Read from the resources txt file
- Passed each line to BING for translating
- Each request is a parallel execution
- Used async continuations to process out the results
That’s it, so it just took 20 mins and saved me the whole day’s work! I’m pretty sure most .NET apps have requirement of having it localized in various languages, this is one way to get your work done. You can take a look at the source code in github, https://github.com/fahadsuhaib/FSharpTools. Check out the readme to know how to use it.
-Fahad
You can follow me on Twitter – @fahadsuhaib