diff --git a/app/helpers/application_helper.rb b/app/helpers/application_helper.rb index 046ab45f017..b26b81c939f 100644 --- a/app/helpers/application_helper.rb +++ b/app/helpers/application_helper.rb @@ -177,10 +177,8 @@ module ApplicationHelper ["ar", "ur", "fa_IR", "he"].include? I18n.locale.to_s end - def user_locale - locale = current_user.locale if current_user && SiteSetting.allow_user_locale - # changing back to default shoves a blank string there - locale.present? ? locale : SiteSetting.default_locale + def html_lang + SiteSetting.default_locale.sub("_", "-") end # Creates open graph and twitter card meta data diff --git a/app/views/layouts/application.html.erb b/app/views/layouts/application.html.erb index 94bf3070370..b815383d674 100644 --- a/app/views/layouts/application.html.erb +++ b/app/views/layouts/application.html.erb @@ -1,5 +1,5 @@ - + <%= content_for?(:title) ? yield(:title) : SiteSetting.title %> diff --git a/app/views/layouts/crawler.html.erb b/app/views/layouts/crawler.html.erb index 98f15b0e469..4cbf2eef8df 100644 --- a/app/views/layouts/crawler.html.erb +++ b/app/views/layouts/crawler.html.erb @@ -1,5 +1,5 @@ - + <%= content_for?(:title) ? yield(:title) : SiteSetting.title %> diff --git a/app/views/layouts/no_ember.html.erb b/app/views/layouts/no_ember.html.erb index eb8c6fabdf8..8b68e33910f 100644 --- a/app/views/layouts/no_ember.html.erb +++ b/app/views/layouts/no_ember.html.erb @@ -1,5 +1,5 @@ - + <%= content_for?(:title) ? yield(:title) : SiteSetting.title %> diff --git a/app/views/offline/offline.html.erb b/app/views/offline/offline.html.erb index 8e3115986a8..3c6d870fb97 100644 --- a/app/views/offline/offline.html.erb +++ b/app/views/offline/offline.html.erb @@ -1,5 +1,5 @@ - + diff --git a/app/views/topics/plain.html.erb b/app/views/topics/plain.html.erb index 52d6d5cbdbc..25531cb837d 100644 --- a/app/views/topics/plain.html.erb +++ b/app/views/topics/plain.html.erb @@ -1,5 +1,5 @@ - + <%= @topic_view.topic.title %> diff --git a/app/views/user_notifications/digest.html.erb b/app/views/user_notifications/digest.html.erb index de8e805c8d4..71ebed0cb32 100644 --- a/app/views/user_notifications/digest.html.erb +++ b/app/views/user_notifications/digest.html.erb @@ -1,5 +1,5 @@ - +