svenfuchs/routing-filter

Locale selector

Closed this issue · 2 comments

Once i running with routing-filter, what is the best way to change locale in views?

Example:
Chose Languge: English | Español | French

How i can accomplish this?

I have this in application_controller.rb
def set_user_language
I18n.locale = logged_in? ? current_user.profile.language.to_s : request.env['rack.locale']
end

I look in user's preferences and browser's preferences but i want to display links with languages

Hi Andres,

Your question is a general Rails I18n question and does not relate to the routing-filter gem. Please check out http://edgeguides.rubyonrails.org/i18n.html

Thanks i made a gist with my thoughs https://gist.github.com/535725