How do I set the refresh js file when you change the language?
I have translation files in
config/locales/en.yml and pl.yml
and in vendor/assets/javascripts/file.js.erb i have
console.log("<%= I18n.t('test.test') %>")
I included js in app/views/index.html.erb
It works ok, but when I change the cookie with the language and refresh the page js does not change the language?
How i can set compile "file.js.erb" whenever the page is refreshed?