Curry gives me the best ideas
Posted on Thursday, July 24th, 2008 at 12:15 am
So, I made curry tonight, and it gave me a really good idea:
What options does a non-English speaking user have when visiting an English-only website?
My server logs tell me they use Babelfish.
The problem with Babelfish (or any net-translator) is that it breaks the website. It pushes it through a Find-and-Replace dictionary of terms that completely changes your site. It also tends to ignore cookies, and really butchers your Javascript because of cross-domain issues.
What can web developers do?
What can you do if you don't have the funds to hire an extensive localization team?
Why not use Javascript to cycle through all the elements on a page that need to be translated (menu items, headlines, form labels, etc), and push them through to a web service (like, Yahoo! Pipes) to translate it for you! Use JSONP to get the results back and replace the text of the elements dynamically as they're loaded/translated.
I actually made a more optimized version that took an array of items to speed up translation/load time, but Yahoo! Pipes was down when I tried to save it, so it wouldn't let me. (I would also like to have it talk to a Flash file to dynamically save/cache translations as they're made).
Machine translation isn't perfect, but it's better than making your users go to Babelfish just to figure out how to login.
What options does a non-English speaking user have when visiting an English-only website?
My server logs tell me they use Babelfish.
The problem with Babelfish (or any net-translator) is that it breaks the website. It pushes it through a Find-and-Replace dictionary of terms that completely changes your site. It also tends to ignore cookies, and really butchers your Javascript because of cross-domain issues.
What can web developers do?
What can you do if you don't have the funds to hire an extensive localization team?
Why not use Javascript to cycle through all the elements on a page that need to be translated (menu items, headlines, form labels, etc), and push them through to a web service (like, Yahoo! Pipes) to translate it for you! Use JSONP to get the results back and replace the text of the elements dynamically as they're loaded/translated.
$('h2, form p, form label, legend').each(function() {
var item = $(this);
var translate = encodeURI($(this).text());
$.getJSON('http://pipes.yahoo.com/pipes/pipe.run?_id=NsgXF0pZ3RG4DUvBjtzu1g&_render=json&translateStr=' + translate + '&_callback=?', function(data) {
item.text(data.value.items[0].translation);
});
});I actually made a more optimized version that took an array of items to speed up translation/load time, but Yahoo! Pipes was down when I tried to save it, so it wouldn't let me. (I would also like to have it talk to a Flash file to dynamically save/cache translations as they're made).
Machine translation isn't perfect, but it's better than making your users go to Babelfish just to figure out how to login.
Related posts
Search
Tag Cloud
ajax as3 businesscard captcha chumby css design fap fapi flash hack hotlinking interface javascript jquery json lightbox myspace pipes site translation typography usability webservice wigits xss yahoo