Reputation: 953
I'm under rails 3.2.1 and I have a problem by show the localized month name from
date.strftime("%d %B %Y")
I always get the english version even if I set the locale in application.rb
config.i18n.default_locale = :it
and from console app I get this output
> I18n.locale
=> :it
any hint? Thank you
Upvotes: 0
Views: 423
Reputation: 58067
Check out the Rails Internationalization API Guide
First, make sure you have the translation files for your language. You need a .yml file which describes your language. Section 3.3 describes how to set up a localization file dealing with date and time formats.
Now, load up your localization. (It appears that you've already done this.) It seems that there are several places where you can set up your locale. Section 2.2 f the guide talks about loading up a locale manually.
Finally, this question has more on Ruby Date Internationalization.
Upvotes: 1