Maintainable I18n with Rails and AngularJS
Alessandro Desantis
124

First of all, thanks for publishing this post. It helped us a lot.

I just wanted to point an error in your code examples: when you are setting the “prefix” attribute in the “$translateProvider.useStaticFilesLoader” block, you typed “locales” where you should had typed “translations”, otherwise you’ll get a 404 error when trying to get the translations file.

Another problem I spotted is that using Rails translation files angular-translate won’t be able to perform variable replacement as Rails uses %{this_syntax} and angular-translate uses {{this_other}}. Anyway, I think that can be fixed by replacing one syntax to another programmatically in the TranslationsController.

Cheers.