I have a navbar with links to different languages:
<%= link_to t('header.english'), locale: "en" %>
The problem is when user tries to switch language on a page which contains additional parameters in the url. Changing locale at this point reloads the page and strips all the additional parameters.
So, how do I pass all the parameters from the current page to the locale switch link?
For example, when
/page/new?param1=1¶m2=2
is open, and user switches the locale,
/page/new?locale=en
is opened, and both additional parameters are stripped away from the url.