in my rails3 app, i'm using devise for authentication
now i'm trying to do i18n. for that i saw a devise.en.yml
in config/locales
, and thought all i got to do is make an devise.ro.yml
to translate it in my other language. but if the devise.ro.yml
is present, everything is in ro, no matter the language i use
for changing language, i use a locale param in my urls. for that i set up in the application controller something like this:
before_filter :set_locale
def set_locale
I18n.locale=params[:locale]
end
def default_url_options(options={})
{ :locale => I18n.locale }
end
everything in my app is translated ok, except the devise part
am I missing something here?
I can suppose you do in top of you devise.ro.yml ro
instead of en
?
First you need to generate Devise views with: rails generate devise:views
, then you can translate each of those to suite your locale needs.
devise.en.yml
is only for flash messages.
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With