Module: CMS::LocaleHelper
- Defined in:
- app/helpers/cms/locale_helper.rb
Instance Method Summary collapse
Instance Method Details
#cms_locale_selector ⇒ Object
3 4 5 6 7 8 9 10 11 12 13 14 15 16 |
# File 'app/helpers/cms/locale_helper.rb', line 3 def cms_locale_selector links = [ link_to(t('cms.locale_selector.language'), '#', class: 'active') ] I18n.available_locales.reject{ |l| l == locale }.each do |locale| path = current_url_for(locale) links << link_to(t('cms.locale_selector.language', locale: locale), path) end content_tag(:ul) do links.each do |link| concat content_tag(:li, link) end end end |