Localization is a lot of work!

But satisfying. I’m finally calling elana.braun-jones.org localized enough and I have to say that it is cool to have an identical feature set in two fully localized versions (en_US and fr_FR). Just some of the tasks to get the site fully localized:

  • Make the FreeDream theme localizable by wrapping all the text in __(…) or _e(…) GNU gettext wrappers. Ironically, the theme was written by a French lady who hard-coded some French strings that I had to first translate to English so that I could then …
  • Translate the FreeDream theme to French. I used Poedit which has a mediocre UI, but it met my minimum requirements. This tool scanned the theme’s PHP source and generated a .pot/.po. I commissioned some help to get the strings translated then generated the .mo file (poedit actually does this automatically every time you save) and uploaded to the theme’s directory. Things looked good, but there were still some miscellaneous strings still in English. To zap those, I had to…
  • Install WPML and translate some more. WPML is the key ingredient that makes translating a WordPress site manageable. And it does so without mucking up the default WordPress SQL tables. Aside from providing nice interfaces that allow you to translate all your own content (posts, categories, and pages), it also hunts down those miscellaneous strings that I mentioned and provides a web interface to translate them. You can even export .po/.mo files when you’re done. Very cool. This is the feature that makes it easy to…
  • Localize custom site features. Since WPML can translate Text widgets (which can hold HTML and even PHP) I was able to add a growth chart generated by Google Chart that displayed inches or centimeters based on the locale. In the same way, I added a MailChimp RSS-to-Email subscription form that subscribed users to the correct list – an English one connected to domain.com/feed/ and a French one connected to domain.com/fr/feed/.

And voilà.

This entry was posted in Uncategorized and tagged , . Bookmark the permalink.

Leave a Reply

Your email address will not be published. Required fields are marked *