So, we have an existing Rails 2.3.5 app that does not support Internationalization at all. Now, I\'m well familiar with Rails I18n stuff, but we have a LOT of output strings
Why not simply this in your Javascript file:
var a_message = "<%= I18n.t 'my_key' %>"
For this to work, you must add .erb to your Javascript file's extension.
You might also need to add the following line at the top of your Javascript file if you aren't using ruby >= 2.0.
<%# encoding: utf-8 %>
See the last comment of the accepted answer in this thread for more info: Encoding issues in javascript files using rails asset pipeline