I use before_filter in ApplicationController to set the language for my application:
class ApplicationController < ActionController::Base protect_from_forgery before_filter :set_locale def set_locale I18n.locale = request.compatible_language_from ["uk", "ru", "de", "en"] end end
It works for controllers that are written by me. But all the finished messages are still English.
Setting config.i18n.default_locale = "uk"
(or another) in config/application.rb
works, so I think the problem is that the developer is not using my before_filter file (maybe it does not inherit ApplicationController
(?) At all) .
How to solve this problem? How to make an application using my language?
source share