mongoose-i18n

0.3.0 • Public • Published

Mongoose i18n Schema Plugin

Surprisingly there is not a proper plugin for this. I found a couple gists that do this:

I didn’t see anything in the npm repo, so...

Usage

Install:

npm i --save mongoose mongoose-i18n

Create your schema:

mongoose = require 'mongoose'
i18nPlugin = require 'mongoose-i18n'
 
# ... create your schema, e.g. MySchema ... #
 
MySchema.plugin i18nPlugin, languages: ['en', 'fr'], defaultLanguage: 'en'
 

/mongoose-i18n/

    Package Sidebar

    Install

    npm i mongoose-i18n

    Weekly Downloads

    20

    Version

    0.3.0

    License

    MIT

    Last publish

    Collaborators

    • elrolito