← Home

Get on Rails with Globalize: a comprehensive writeup in 8 parts

As most of the parts of this series aren't complete yet, I'll edit the following outline as soon as stuff sediments. To stay informed about updates please subscribe to my blog.

Part 1 of 8: Five minutes instant overview

  • How to install and configure Globalize
  • How to translate arbitrary text (ViewTranslations)
  • How to translate Rails models (ModelTranslations)
  • How to add translations to the database
  • How to localize Dates, Times and Numbers

Part 2 of 8: Some common questions on getting started

  • How to setup your application to use Unicode
  • How to select and persist the current user's locale
  • How to translate Rails ActiveRecord messages
  • How to localize entire templates

Part 3 of 8: Globalize's advanced features

  • Abstracting ViewTranslations (sprintf-like usage)
  • Singular and (multiple) plural ViewTranslations
  • Globalize's Currency class
  • Piggyback translated ActiveRecord associations

Part 4 of 8: How to set up your routes?

  • Pros and cons of different ways to store the locale:
  • Sessions, accept-language header, geo-location
  • RESTful, URL-based approaches

Part 5 of 8: Advanced techniques, tips and tricks

  • Preload View Translations in Production
  • Bridge Globalize and TZInfo
  • Clear Globalize's translations runtime cache
  • Use nice predicated block helpers in your views
  • Organize your translations through Globalize's namespaces
  • Alternative Storage Mechanism for Model Translations
  • Disable Globalize::ViewTranslation's SQL logging

Part 6 of 8: Pimp your Globalize! Extensions, plugins and patches

  • Multilingual URLs
  • Patch Globalize to get it working with :include and no base language
  • Translate your application while browsing it
  • Localized, concise Rails URL helpers
  • Get Liquid templates to play nice with Globalize
  • Globalize time_ago_in_words method of Rails
  • Multiple arguments to fetch

Part 7 of 8: Gotchas and other funny things to know and avoid

  • I'm seeing lot's of strange characters!
  • Weird Currency parsing results
  • Globalize WrongLanguageError on attribute read
  • Globalizes screws my RJS (or: my IE6)!

Part 8 of 8: ...