Showing
2 changed files
with
5 additions
and
1 deletions
| @@ -98,6 +98,10 @@ module Kanjai | @@ -98,6 +98,10 @@ module Kanjai | ||
| 98 | I18n.locale = Rails.application.config.i18n.default_locale | 98 | I18n.locale = Rails.application.config.i18n.default_locale |
| 99 | end | 99 | end |
| 100 | 100 | ||
| 101 | + if domain.page_langs.count > 1 && original_fullpath == '/' | ||
| 102 | + redirect_to "/#{I18n.locale}" and return | ||
| 103 | + end | ||
| 104 | + | ||
| 101 | 105 | ||
| 102 | #@page_data = PageDatum.where(:url => @url).first | 106 | #@page_data = PageDatum.where(:url => @url).first |
| 103 | #$current_locale = PageLang.where(default_use: true).first.code | 107 | #$current_locale = PageLang.where(default_use: true).first.code |