Bootstrap your i18n with Pronto

I've been steadily working at rounding out some areas of Pronto lately, and one has been the i18n support.  Pronto supported multiple languages and UTF-8 before now, but that functionality didn't extend to application modules, and my little hack to translate message files via Google Translate was only partially complete.

With the next release, however, this stuff will be actually usable.  Google Translate supports all the major languages, so in a couple commands, you can now do this:

  1. Scan your entire application codebase (including modules) and compile all strings into a messages file; and
  2. Automatically translate that messages file into the following languages:
  • Arabic
  • Chinese Simplified
  • Chinese Traditional
  • Dutch
  • French
  • German
  • Greek
  • Italian
  • Japanese
  • Korean
  • Portuguese
  • Russian
  • Spanish

Of course, Google Translate is far from perfect, so this only really serves as a "good enough for now" solution.  Once your application is production quality, so should your translations, and that means getting translations from real human beings.

Here's a quick excerpt showing how I build my initial messages file and then translate them:

[jvinet@neptune site]$ php pronto/bin/i18n_scan.php en English
Scanning app/bin
Scanning app/config
Scanning app/core
Scanning app/models
Scanning app/pages
Scanning app/plugins
Scanning app/profiles
Scanning app/templates
Scanning pronto/core
Scanning pronto/plugins
Scanning pronto/profiles

Successfully updated app/config/i18n/en/messages.php

[jvinet@neptune site]$ cd app/config/i18n

[jvinet@neptune i18n]$ php ../../../pronto/bin/translate_all.php
Translating English to Arabic...
Translating English to Chinese Simplified...
Translating English to Chinese Traditional...
Translating English to Dutch...
Translating English to French...
Translating English to German...
Translating English to Greek...
Translating English to Italian...
Translating English to Japanese...
Translating English to Korean...
Translating English to Portuguese...
Translating English to Russian...
Translating English to Spanish...

Yep, that's it. Stay tuned for the next release.

http://www.prontoproject.com

1 Response

  1. Achille Says:
    October 06, 2008 at 10:20 am -0700

    Great work!
    I'm waiting the next release with impatience!


Add Your Comment