What's the common approach to handle internationalization for Mongodb in Node.js?, isn't there anything like Mongoid (http://two.mongoid.org/docs/documents/localized.html)? or anything like this that enforces some sort of schema over Mongodb defeats the purpose of using a nosql database? I'm having a hard time setting in on what to use for my next API, the thing I know for sure is that I want to use and learn Mongodb and I also need some documents in my database to have some internationalized fields like:
{
"_id" : "xxxxx"
"house_description" : "The first one in the block"
}
How would I go about translating that house_description using different languages?, I'm also building an Android app which will use this API, through the request it will send some sort of identifier to let the API know what language it needs.
You wouldn't internationalize fields, but labels for that field shown in the application.
There are plenty of tutorials about internationalization and localization around, but here is how it works in general:
messages.properties for the default language) for translating the "F_HOUSE_DESCRIPTION" for example to something more meaningful and / or readable, like "description of house".Now here come the good news: the most parts of that are provided by Java out of the box (http://docs.oracle.com/javase/tutorial/i18n/intro/steps.html) and of course by Android, too (http://developer.android.com/guide/topics/resources/localization.html), though it is done slightly different there.