Methods

Class/Module Index [+]

Quicksearch

Padrino::Contrib::AutoLocale::Helpers

Public Instance Methods

switch_to_lang(lang) click to toggle source

This reload the page changing the I18n.locale

# File lib/padrino-contrib/auto_locale.rb, line 24
def switch_to_lang(lang)
  request.path_info.sub(/\/#{I18n.locale}/, "/#{lang}") if settings.locales.include?(lang)
end

[Validate]

Generated with the Darkfish Rdoc Generator 2.