Skip to content

Instantly share code, notes, and snippets.

@rbarazi
Created April 9, 2010 02:43
Show Gist options
  • Save rbarazi/360830 to your computer and use it in GitHub Desktop.
Save rbarazi/360830 to your computer and use it in GitHub Desktop.
[Beginning Rails 3] Listing 11-10 – Setting default locale to Brazilian Purtugese in config/application.rb
require File.expand_path('../boot', __FILE__)
require 'rails/all'
# If you have a Gemfile, require the gems listed there, including any gems
# you've limited to :test, :development, or :production.
Bundler.require(:default, Rails.env) if defined?(Bundler)
module Blog
class Application < Rails::Application
# Activate observers that should always be running
config.active_record.observers = :comment_observer
# Configure the default encoding used in templates for Ruby 1.9.
config.encoding = "utf-8"
# Configure sensitive parameters which will be filtered from the log file.
config.filter_parameters += [:password]
# Setting the locale
config.i18n.default_locale = 'pt-br'
end
end
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment