I need a temporary locale. I noticed the locale option for
Globalite::L10n.localize(), but this seems like a better solution:
class Object
def with_locale(locale, &block)
original_locale = Locale.code
Locale.set_code(locale)
returning block.call do
Locale.set_code(original_locale)
end
end
end
Original issue reported on code.google.com by cainl...@gmail.com on 19 Dec 2007 at 7:18
Original issue reported on code.google.com by
cainl...@gmail.com
on 19 Dec 2007 at 7:18