Rails i18n and routes in javascript
Posted
by StefanS
on Stack Overflow
See other posts from Stack Overflow
or by StefanS
Published on 2010-05-18T19:58:47Z
Indexed on
2010/05/18
20:00 UTC
Read the original article
Hit count: 350
Sometimes it would be really handy to have the Rails localization files available in JavaScript. Same is true for for the routes helpers.
I found these two plugins which are exactly doing this:
- Exposing i18n to JavaScript: http://github.com/fnando/i18n-js
- Rails Routes in JavaScript: http://tore.darell.no/pages/javascript_routes
My questions:
- Are there any other plugins / gems doing similar things like the two above?
- What's the right approach in Rails? Meta tag? Additional data- attributes?
Thanks for any input!
© Stack Overflow or respective owner