Herokuのi18n問題

Herokuにi18n対応したRails3アプリをデプロイしてみましたが、config/application.rbに設定した以下の内容が有効になりませんでした...


config/appliction.rb

class Application < Rails::Application
  :
  config.i18n.default_locale = 'ja'
  :
end

ちょっと調べてみたところ解決策があったので、メモしておきます。
こうすればOKでしたー。


app/controllers/application_controller.rb

class ApplicationController < ActionController::Base
  before_filter :set_locale

  def set_locale
    I18n.locale = "ja" || I18n.default_locale
  end
  :
end

Source: ruby on rails - Heroku and i18n Problems - Stack Overflow