Babelphish – yml Translation Made Simple

by Justin Ball on May 19th, 2009

You've just finished version one of your most excellent, million dollar application. You've built it the right way. All of your application' strings live in the en.yml file neatly tucked into the locales directory patiently waiting for the day when you hit it big, go international and hire a expensive fancy firm to translate your application for the next big market.

Why wait? Impress your friends, your family, and the ladies right now. Today. In just seconds.

With Google Translate and some gem magic your application can now impress your investors in 41 languages. Win friends and influence people in just three simple steps:

sudo gem install ya2yaml

sudo gem install babelphish 

babelphish -y ./locales/en.yml -o

Viola! Your application now has a yml file for every language Google supports. -y gives the path to your source file. Feel free to start with other languages es.yml, jp.yml, etc all work just fine. -o means overwrite the files in the directory. If you have already paid someone a lot of money to translate your application I don't recommend using that option.

In case you think I suck as a programmer feel free to go fork it.

  • Setti
    That is the easiest and cheapest way to create multilingual content, no question about it.

    But happy are you if the translation is quality of 75% accuracy on day good it might are. Away run your customers and investors know never you. :)

    Machine translation is easy, but not suitable for publishing. Machines can only substitute words, not translate meaning, which is where you're likely end up looking unprofessional. How big is your average website? 1000 words maybe? You can hire a professional translator to do that for you for about EUR 150 (depending on the language, of course). It's not going to run anyone into bankruptcy to get your translation done properly if you do it right. Of course, you can go to the most expensive translation company in the world and have it done for EUR 1,000 as well, but that's just because you don't know how to buy translations. In that case, you could use something like Translizer, which is like Hotels.com, but for translations.
  • Justin, perfect, that's exactly what I was looking for. Thanks so much nice work.

    Paul
blog comments powered by Disqus