Skip to content

Instantly share code, notes, and snippets.

@luizalbsilva
Created October 28, 2017 21:12
Show Gist options
  • Save luizalbsilva/69c5e8986246dc7d2f8ca9db106fba63 to your computer and use it in GitHub Desktop.
Save luizalbsilva/69c5e8986246dc7d2f8ca9db106fba63 to your computer and use it in GitHub Desktop.
# config/initializers/locale.rb
# Where the I18n library should search for translation files
I18n.load_path += Dir[Rails.root.join('lib', 'locale', '*.{rb,yml}')]
# Whitelist locales available for the application
I18n.available_locales = [:en, :pt]
# Set default locale to something other than :en
I18n.default_locale = :pt
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment