Rails: Internationalization of Javascript Strings?
Posted
by Matt Rogish
on Stack Overflow
See other posts from Stack Overflow
or by Matt Rogish
Published on 2010-04-23T20:20:29Z
Indexed on
2010/04/23
20:23 UTC
Read the original article
Hit count: 314
So, we have an existing Rails 2.3.5 app that does not support Internationalization at all. Now, I'm well familiar with Rails I8n stuff, but we have a LOT of output strings inside /javascripts/. I'm not a huge fan of this approach, but unfortunately it is too late to fix it now.
How might we internationalize strings stored in JS files in a Rails app? Rails doesn't even serve the JS files...
I'm thinking I could always have the Rails app serve up the JS files, but that seems pretty gross. Are there plugins to do this? Yikes.
© Stack Overflow or respective owner