Founding Engineer ๐ค @ kumo.ai - PhD from TU Dortmund University
rusty1s / mongoose-i18n-localize Goto Github PK
View Code? Open in Web Editor NEWMongoose plugin to support i18n and localization
License: MIT License
Mongoose plugin to support i18n and localization
License: MIT License
Founding Engineer ๐ค @ kumo.ai - PhD from TU Dortmund University
I'm on 5.7.3 and it works OK, but not on the latest:
Emitted 'error' event at:
{
message: 'Invalid ref at path "F3FCYBUABRY.en". Got null',
name: 'MongooseError'
}
Hi,
would it be hard to implement support for arrays of strings? Like:
name: { type: String, }, localizedName: { type: String, i18n: true, }, nicknames: { type: [String], i18n: true, }
So that as a result you would have
name
localizedName.fi
and also
nicknames.fi[0]?
I think it is time to make a new release with the new changes, the repo is not developing rapidly to wait for long time :)
I'm getting this error when I try and apply this to an existing collection. I'm wondering if this even possible to do or if I need to migrate it somehow.
/node_modules/mongoose-i18n-localize/index.js:18
schema.remove(pathname);
^
TypeError: schema.remove is not a function
Hi,
I have a problem when I try to update a field with i18n: true with the version of node 6.6.0
I have 2 servers. The development with the version of nodejs 6.4.0 and I have no problems, but in the test server, which has the version of nodejs 6.6.0 throws the following error:
Cannot set property 'es-ES' of undefined
at model.Document.$__set (.../node_modules/mongoose/lib/document.js:889:21)
at model.Document.set (.../node_modules/mongoose/lib/document.js:772:10)
at model._handleIndex (.../node_modules/mongoose/lib/document.js:609:14)
at model.Document.set (.../node_modules/mongoose/lib/document.js:569:24)
at model._handleIndex (.../node_modules/mongoose/lib/document.js:593:12)
at model.Document.set (.../node_modules/mongoose/lib/document.js:569:24)
at model._handleIndex (.../node_modules/mongoose/lib/document.js:593:12)
at model.Document.set (.../node_modules/mongoose/lib/document.js:569:24)
at model._handleIndex (.../node_modules/mongoose/lib/document.js:593:12)
at model.Document.set (.../node_modules/mongoose/lib/document.js:569:24)
at model.Document.set (.../node_modules/mongoose/lib/document.js:642:14)
at model.set [as emailConfig] (.../node_modules/mongoose/lib/document.js:1790:41)
...
The versions of mongo and mongoose are the same
You can help?
What about indexing? If I have a model
var schema = new mongoose.Schema({
name: {
type: String,
i18n: true
}
});
How can I do cross-language search? Or will it always have to be schema.find({'name.en': /search/})
?
A declarative, efficient, and flexible JavaScript library for building user interfaces.
๐ Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
An Open Source Machine Learning Framework for Everyone
The Web framework for perfectionists with deadlines.
A PHP framework for web artisans
Bring data to life with SVG, Canvas and HTML. ๐๐๐
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
Some thing interesting about web. New door for the world.
A server is a program made to process requests and deliver data to clients.
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
Some thing interesting about visualization, use data art
Some thing interesting about game, make everyone happy.
We are working to build community through open source technology. NB: members must have two-factor auth.
Open source projects and samples from Microsoft.
Google โค๏ธ Open Source for everyone.
Alibaba Open Source for everyone
Data-Driven Documents codes.
China tencent open source team.