Ruby on Rails Tuesday, January 24, 2017
In order to support internalization in our application, we are giving an option to the user to select the language. But the problem here is, when one user select one language for example 'Chinese', all other users browser's language also changing to Chinese.
We want something like changing language at client level instead of server level. Is it possible in rails?
Below is the code I am using for setting locale.
I18n.default_locale = params[:lang]
I18n.locale = I18n.default_locale
Please let me know if any suggestion on this.
You received this message because you are subscribed to the Google Groups "Ruby on Rails: Talk" group.
To unsubscribe from this group and stop receiving emails from it, send an email to email@example.com.
To post to this group, send email to firstname.lastname@example.org.
To view this discussion on the web visit https://groups.google.com/d/msgid/rubyonrails-talk/CA%2BfXU%2B0_CoQ5UA3Hk%2BUaPr24OJd%2BRSUiz43KO-sWiF29N6PMLQ%40mail.gmail.com.
For more options, visit https://groups.google.com/d/optout.
Posted by Ruby on Rails at 1:36 AM