Sha256: d08f2841fb5a57fb63d499865a4a9dfba9559338badbb7cc09f89a25146d2dc2
Contents?: true
Size: 1.47 KB
Versions: 3
Compression:
Stored size: 1.47 KB
Contents
# Filters added to this controller apply to all controllers in the application. # Likewise, all the methods added will be available for all controllers. class ApplicationController < ActionController::Base helper :all # include all helpers, all the time # See ActionController::RequestForgeryProtection for details # Uncomment the :secret if you're not using the cookie session store protect_from_forgery # :secret => '639df270d82028344f5a50f543530c57' # See ActionController::Base for details # Uncomment this to filter the contents of submitted sensitive data parameters # from your application log (in this case, all fields with names like "password"). # filter_parameter_logging :password # Set the charset of Content-Type. # This is not Ruby-Locale method but useful. # self.default_charset = "iso8859-1" =begin def before_init_i18n # Initialize other i18n libraries before init_locale if you need. # Or set "lang" to it's own value before initializing Locale. if (cookies["lang"].nil? or cookies["lang"].empty?) params["lang"] = "ko_KR" end end before_init_locale :before_init_i18n def after_init_i18n # Initialize other i18n libraries after init_locale if you need. # # LocalizeFoo.locale = Locale.current # I18n.locale is set in init_locale, but other I18n features # is not set by Ruby-Locale. So you may need to add the code to work your # Rails i18n plugins. end after_init_locale :after_init_i18n =end end
Version data entries
3 entries across 3 versions & 1 rubygems
Version | Path |
---|---|
locale_rails-0.1.0 | sample/app/controllers/application.rb |
locale_rails-2.0.0 | sample/app/controllers/application.rb |
locale_rails-2.0.1 | sample/app/controllers/application.rb |