bing_translate_yaml is a simple Ruby on Rails plugin for translating your YAML files using Bing.
Installation¶ ↑
In your Gemfile:
gem 'bing_translate_yaml'
Then run bundle install
.
Example¶ ↑
Make sure you have your translation files in e.g.:
config/locales/en.yml (English) config/locales/de.yml (German) config/locales/es.yml (Spanish)
Run:
$ rake translate from=en to=es app_id="<Your Microsoft API Application ID>"
This will create (or update) the following file:
config/locales/es.yml
Enjoy :-)
Todo’s¶ ↑
-
Encapsulate all translation logic in separate class
Thanks¶ ↑
Thanks to Ricky Elrod for his excellent and simple bing_translator gem!
Copyright © 2012 Lasse Bunk, released under the MIT license