Showing
2 changed files
with
3 additions
and
1 deletions
| ... | ... | @@ -24,6 +24,8 @@ module Kanjai |
| 24 | 24 | def define_locale |
| 25 | 25 | if params && params[:locale].present? && request.original_fullpath.split('/')[1].length == 2 |
| 26 | 26 | I18n.locale = params[:locale] |
| 27 | + elsif Kanjai::PageLang.where(default_use: true).first | |
| 28 | + I18n.locale = Kanjai::PageLang.where(default_use: true).first.code | |
| 27 | 29 | else |
| 28 | 30 | I18n.locale = Rails.application.config.i18n.default_locale |
| 29 | 31 | end | ... | ... |