Created
April 9, 2023 02:02
-
-
Save salvadorgascon/8f9e70a6e397b58f696fe63d7afac393 to your computer and use it in GitHub Desktop.
Load locales and setup available locales in Ruby on Rails
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
I18n.load_path += Dir[Rails.root.join('config', 'locales','**', '*.{rb,yml}').to_s] | |
I18n.available_locales = [:es, :en] | |
I18n.default_locale = :es |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment