Ruby on Rails
Saturday, December 28, 2019
On Thursday, December 26, 2019 at 6:17:23 PM UTC-5, Cédric Lefebvre wrote:
I have deployed devise & devise-i18n to internationalize devise. Everything works well - including all the i18n - except that flash messages generated by devise do not get translated=> messages generated by devise and accessed via resource.errors.full_messages are localized
e.g. try to "sign_up" with no information filled in
=> flashes generated by devise are not localized
e.g. try to "sign_in" with no information filled in
Any idea why? Any idea on how to fix this?
Have you created settings for i18n in application.rb ?
Here's what application.rb looks like on one of my sites that uses locales:
Rails.application.config.i18n.available_locales = ["ko", "zh-TW", "ja", "en-US"]
Rails.application.config.i18n.default_locale = "en-US"
ISO3166.configure do |config|
config.locales = ['zh-TW', 'en-US', 'ko', 'ja']
Rails.application.config.i18n.default_locale = "en-US"
ISO3166.configure do |config|
config.locales = ['zh-TW', 'en-US', 'ko', 'ja']
You received this message because you are subscribed to the Google Groups "Ruby on Rails: Talk" group.
To unsubscribe from this group and stop receiving emails from it, send an email to rubyonrails-talk+unsubscribe@googlegroups.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/rubyonrails-talk/526f03ab-5181-45e1-9a8d-622e1ec17fb6%40googlegroups.com.
Subscribe to:
Post Comments (Atom)
No comments:
Post a Comment