Rails change locale get back to current page
<p>I've got the following rails code:</p>

<p>I try to set the language of my application with this</p>

<pre><code> def changelocale
if Settings.language_supported?(params[:locale])
  session[:locale] = params[:locale]
  I18n.locale = params[:locale]
end
render "startsite"
 end
</code></pre>

<p>what I want is that the language switch will affect on the current page. the render "startsite" is the problem but what could be a good solution to do this?</p>

<p>thanks</p>