Skip to content

elrolito/mongoose-i18n

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

18 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

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'

About

Mongoose schema plugin for i18n support.

Resources

Stars

Watchers

Forks

Packages

No packages published