Skip to content

Instantly share code, notes, and snippets.

@bricker
Created December 3, 2013 19:51
Show Gist options
  • Save bricker/7776307 to your computer and use it in GitHub Desktop.
Save bricker/7776307 to your computer and use it in GitHub Desktop.
[deprecated] I18n.enforce_available_locales will default to true in the future. If you really want to skip validation of your locale you can set I18n.enforce_available_locales = false to avoid this message.
@mpxc8102
Copy link

mpxc8102 commented Dec 3, 2013

Did you find out how to get rid of this deprecated message?

@mkasztelnik
Copy link

@bricker do you know how to get rid of this warning?

@glebtv
Copy link

glebtv commented Dec 3, 2013

config.i18n.enforce_available_locales= true (or false)

@worace
Copy link

worace commented Dec 3, 2013

hey i came across this issue as well; setting it true does seem to get rid of the warning for me, but I'm still getting the warning with config.i18n.enforce_available_locales = false

Haven't figured out what to do with it yet

@worace
Copy link

worace commented Dec 3, 2013

@mkasztelnik
Copy link

@glebtv thx, it fixes the problem

@fbjork
Copy link

fbjork commented Dec 3, 2013

I set config.i18n.enforce_available_locales = true in application.rb but I'm still getting this warning. Any ideas? I'm on Rails 3.2.16

@peterkovacs
Copy link

Add:

I18n.enforce_available_locales = true | false

to your application.rb (or environment/*.rb) file instead.

@worace
Copy link

worace commented Dec 3, 2013

turned out to be a little weirdness with how the config var was being set in I18n::Config: ruby-i18n/i18n@48de9fe

(class var set to false then getting memoized back to nil)

@aprescott
Copy link

@peterkovacs at least on Rails 4.0.2, I think you need I18n.config.enforce_available_locales = {true,false}, with the .config.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment