3

I found both methods to work but I don't want strange surprises: what' the difference between them? Can I use one or another without problems?

Francesco Belladonna
  • 11,361
  • 12
  • 77
  • 147

1 Answers1

2

Both methods effectively do the same thing:

  1. Record what the current locale is
  2. Set the locale to the specified locale
  3. Run the provided block of code
  4. Set the locale back to the recorded locale

I18n will fetch translations from its locale files, whereas globalize will fetch translations from its database store.

Ryan Bigg
  • 106,965
  • 23
  • 235
  • 261
  • 1
    I initially thought that I18n will just replace the locale, while Globalize will just "simulate" locale change when handling attributes and similar things but without sending back errors and similar things in the *temporary locale* – Francesco Belladonna Mar 03 '13 at 17:29