A Simple Translation Tool For Your Site

File this under cool things you can do when your website is built properly.

Put this module on your sidebar to give your site international flair by letting your users choose to read your site in their own language (courtesy Google Translate). The more real text you’ve got on the site (read: not images), the better this disembabelment works. Now, keep in mind; this is only to help international readers get a gist of what you’re talking about. This does not replace real, human translation. Launching a global enterprise site with this as your localization strategy is like applying for a job at Stanford and putting Jeopardy on your resume.

That being said, it’s a whole lot of fun. Here’s the code:

<form action="http://64.233.179.104/translate_c">
    <input type="hidden" name="u" value="http://yoursite.com">
    <label for="langpair">Translate this web site into:</label>
    <select name=langpair>
        <option value="en|de">German</option>
        <option value="en|es">Spanish</option>
        <option value="en|fr">French</option>
        <option value="en|it">Italian</option>
        <option value="en|pt">Portuguese</option>
        <option value="en|ja">Japanese</option>
        <option value="en|ko">Korean</option>
        <option value="en|zh-CN">Chinese</option>
    </select>
    <input type="hidden" name="hl" value="en">
    <input type="hidden" name="ie" value="UTF-8">
    <input type="hidden" name="oe" value="UTF-8">
    <input type="submit" value="Translate!">
</form>

You really don’t have to do much beside replace “http://yoursite.com” with the page you want translated. If you’re especially keen on giving people the option to translate each page on your site, you could have your content management system fill in that field with an entry’s permalink.

Go ahead, try it out. Did I mention it’s a whole lot of fun? It’d probably be even more fun if could read something other than classical Greek and HTML.

Now, before you ask: no. You can’t seem link directly to a page without Google’s top frame. It must check the headers of the referrer, because if you send the form directly to that address, it routes it right back to the Google site with the frame up top. However, if I enter the URL that the form sends me to directly into the address bar, it comes up without a frame. Also, it worked without a frame when I tried it from my RSS reader. I’d be interesting in finding out if anyone was able to accomplish it some other way.

Note: This doesn’t play nice with Flash. It sort of works with sIFR (Flash Replacement technique for headlines). Google must catch the text before sending it to Flash because both the translated and untranslated text show up. Also, it seems to have some issues with certain positioned elements; it seems to have made my logo go away. I suspect it has something to do with the way it places it’s translation hints that get revealed on hover. (Confirmed: it breaks elements with “position: absolute”.) Anyhow, consider yourself warned.

  • posted on 16 October 2007
  • by Jesse

InterAction:

23 October 20071. seriousandy:

Hey man. Here's the result of translating your first paragraph into German, then into Italian, then copying the Italian result, pasting it into a translator, and converting it back to English. (I know, I have way too much time on my hands, but this is just plain entertaining.) Enjoy!

"Rows under this to cool your things that can be made when situated web it is constructed correctly. You insert this module in the sidebar for giving your situated international atmosphere to the customers to choose to read situated in the own language (courtesy of Google Translate). More The real text you' ve got on the situated (read: not images), the better this disembabelment works. Hour, to hold to mind; This is only in order to help the readers international to obtain a synthesis of what is being spoken. This does not replace real, human translation. Business situated start of a total one with which your strategy of localization is like the application of a workplace near the Stanford and the putting ditto on just the curriculum. Saying this, draft of an entire lottery of divertimento. Here' s the tails:..."

30 November 20072. Naser:

Awesome :) This fits really well with a poor man's blogger blog (i.e., mine). Now with sleeker search box, 3-rd Party Ratings module and a spiffy comment section, who would deny that I'm a god of web-design as well ;)

10 January 20083. Gina Fay Rice:

This one is a good translator device, but I prefer conversisglobal.com. They do all of the work for you so you don't have to deal with the time and frustration it takes to translate your site.

31 March 20084. gamesgeeks:

thanks for the post..your posts are really informative...keepup the good work man..added to my bookmark list..

5 May 20085. Robert Hayes:

I've always been dissatisfied with machine translation programs. Oftentimes the basic sense of the original text can be understood, but equally all that's produced is a senseless linguistic mish-mash. It's a nice feature for low budget sites, but it's definitely better to get a real translator if quality is important, like www.genial-translations.com. You can't win customers with marketing texts that have been machine translated.


YourThoughts?



(Minutia)

This entry was written by Jesse on Tuesday, October 16, 2007 at 2:30 AM and appears in the Accessibility chapter. The previous article was entitled, "Essential CSS Tricks: Image Frames", and the next entry is called, "Five Things You Need To Know About Movable Type Open Source". Bookmark the permalink, save it to del.icio.us or Digg it.

GetUpdated

ElseWhere

Find me on aim Find me on delicious Find me on digg Find me on linkedin Find me on flickr Find me on pownce Find me on twitter Find me on youtube Find me on skype Find me on facebook Find me on livejournal Find me on msn Find me on vox Find me on technorati Find me on yahoo Find me on dopplr

ActionStream

  • Jesse said, "Picking up the crib, taking the relatives to Ikea and then off to Penn's Landing for festivities." Jesse said, “Picking up the crib, taking the relatives to Ikea and then off to Penn’s Landing for festivities.” 2008-07-05T15:11:50Z 2008-07-05T15:11:50Z
  • Jesse said, "I just figured out why I love movies. They relax my brain. Was lying there watching and getting sleepy. Went to bed, now wide awake." Jesse said, “I just figured out why I love movies. They relax my brain. Was lying there watching and getting sleepy. Went to bed, now wide awake.” 2008-07-05T05:11:10Z 2008-07-05T05:11:10Z
  • Jesse said, "Finishing the evening off right by watching Saving Private Ryan." Jesse said, “Finishing the evening off right by watching Saving Private Ryan.” 2008-07-05T02:50:36Z 2008-07-05T02:50:36Z
  • Jesse said, "@textism » If you're going to make sensational indictments about one recently dead, have some respect and back them up." Jesse said, “@textism » If you’re going to make sensational indictments about one recently dead, have some respect and back them up.” 2008-07-05T02:43:49Z 2008-07-05T02:43:49Z
  • Jesse said, "July 4th — all the ambience of war, none of the immediate danger." Jesse said, “July 4th — all the ambience of war, none of the immediate danger.” 2008-07-05T01:34:11Z 2008-07-05T01:34:11Z
  • Jesse said, "@snookca » Somebody asked me that once and I told them $250k." Jesse said, “@snookca » Somebody asked me that once and I told them $250k.” 2008-07-04T18:01:37Z 2008-07-04T18:01:37Z
  • Jesse said, "About to wring the neck of an indecisive client from Europe; unless, of course, they provide me with delicious artisan cheeses." Jesse said, “About to wring the neck of an indecisive client from Europe; unless, of course, they provide me with delicious artisan cheeses.” 2008-07-04T14:28:48Z 2008-07-04T14:28:48Z
  • Jesse said, "INBOX: 0 — HAPPY INDEPENDENCE DAY!!!" Jesse said, “INBOX: 0 — HAPPY INDEPENDENCE DAY!!!” 2008-07-04T07:16:07Z 2008-07-04T07:16:07Z
  • Jesse said, "@tdhedengren » Mark all, archive. Makes me somehow feel like a better person." Jesse said, “@tdhedengren » Mark all, archive. Makes me somehow feel like a better person.” 2008-07-04T06:34:09Z 2008-07-04T06:34:09Z
  • Jesse said, "54 messages left in my inbox. Can I make it?" Jesse said, “54 messages left in my inbox. Can I make it?” 2008-07-04T06:22:25Z 2008-07-04T06:22:25Z