Skip to content

Instantly share code, notes, and snippets.

@hetsch
hetsch / mongoose_localized_schema.coffee
Created October 20, 2012 22:51
mongoose localized schema
mongoose = require("mongoose")
Schema = mongoose.Schema
languages = ['de', 'en', 'es']
defaultLanguage = 'de'
getLanguage = () ->
return 'de'
class MultilingualSchema extends Schema