Translation / localization workflow for nodejs / express app

What setting do you use to localize nodejs / express in your application?

I am currently using i18n-node in my project. But I am not happy with the storage in json files. I would like to have translations stored in the database.

I found a promising module called dialect . It can store translations in mongodb, as well as a module from the same author, which allows you to manage translations via the web interface ( dialect-http ),

Unfortunately, the dialect module does not seem to work with the latest stable versions of node. The problem has been known for 2 months, but since nothing has been updated since then, I think the module is no longer supported.

I think using redis db to store translations also makes sense. I do not know if there is a module for this.

Perhaps you have some hints or some good modules?

+4
source share
3 answers

Why don't you just develop i18n-node and overwrite read and write functions with your own save mechanism?

https://github.com/mashpie/i18n-node/blob/master/i18n.js#L235

It seems that you can easily store json data in a redis key instead of a json file with a few changes.

+3
source

I could suggest you use lingua. Here's an example =) http://www.jmanzano.es/blog/?p=647

+2
source

Another option for lingua may be http://i18next.com/node comes with backends in redis, mongodb or couchDb (and the file system, of course!)

+2
source

All Articles