bragi/trendi18n

Use redis?

PiotrMisiurek opened this issue · 1 comments

As a result the december meeting of Warsaw Ruby User Group I thought about write i18n backend using redis after finished trendi18n. Now, when we have discussion about better way of backend reloading and cachin translations i think redis can be usefull even in this project.

Redis is something between key-value database and caching system. All data is stored in memory, but there is also asynch. write to file, so all data can be restored after redis terminate.

I have never use redis before, all my knowladge has the source in wrug's presentation about redis and it's documentation. I have some idea, how to store translation in key-value db:

  1. join locale, scope and locale to make a key
  2. Add method name and the end of key

For example, we have key "test" in scope "some.scope" in "en" locale. So, we should have following keys in db:

  1. en.some.scope.test:default
  2. en.some.scope.test:zero
  3. en.some.scope.test:one
  4. en.some.scope.test:few
  5. en.some.scope.test:many

What do you think about this idea?

don't use