There are times when having access to the Rails localization files in JavaScript would be extremely helpful. The same goes for the routes helpers.
I came across two plugins that address this need perfectly:
- For exposing i18n to JavaScript: http://github.com/fnando/i18n-js
- For using Rails Routes in JavaScript:
Now, I have a couple of questions:
- Are there any other similar plugins or gems out there apart from the ones mentioned above?
- What is the recommended approach in Rails for achieving this? Meta tags or additional data-attributes?
Any insights or input on this matter would be greatly appreciated!