i18n-node
i18n-node copied to clipboard
generic reader and writer api
instead of the internal read
and write
methods i suggest adding store
option (similar to the express-session module), the store
option is an object that implement 2 methods (read/write), then this i18n-node
module can be shipped with built inFileStore
class where the user can configure it separately :
i18n.configure({
store: new FileStore({directory:"./i18n", autoReload:true, ...}),
locales: ["en","fr"],
// other options
})
the point is i really like this module and the api but this time i want to use it with database or from redis cache and i can see there is other issues they want similar functionality.
if you think this idea is good i can start working on it, or if you have better idea please let me know
This is exactly how I planed to Support storage modules. 1.0.0 should be refactored to es6, split up into modules and provide a pluggable storage api.
Still that side project needs time :(
Von meinem iPhone gesendet
Am 28.09.2017 um 09:05 schrieb Fareed Namrouti [email protected]:
instead of the internal read and write methods i suggest adding store option (similar to the express-session module), the store options is an object that implement 2 methods (read/write), then this 18n-node can be shipped with built inFileStore class where the user can configure it separately :
i18n.configure({ store: new FileStore({directory:"./i18n", autoReload:true, ...}), locales: ["en","fr"], // other options }) the point is i really like this module and the api but this time i want to use it with database or from redis cache and i can see there is other issues they want similar functionality.
if you think this idea is good i can start working on it, or if you have better idea please let me know
— You are receiving this because you are subscribed to this thread. Reply to this email directly, view it on GitHub, or mute the thread.