diff --git a/app/helpers/application_helper.rb b/app/helpers/application_helper.rb index cee6db199..11e4cae8c 100644 --- a/app/helpers/application_helper.rb +++ b/app/helpers/application_helper.rb @@ -14,7 +14,13 @@ module ApplicationHelper home_page? ? '' : 'results' end - def available_locales_to_switch - I18n.available_locales - [I18n.locale] + def available_locale_options_for_select + options_for_select(available_locales_array, I18n.locale) end + + private + def available_locales_array + I18n.available_locales.map { |loc| [I18n.t('locale', locale: loc), loc] } + end + end