android


Internationalizing mongodb nodejs


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:
Instead of giving multiple names, one for each language to a field you define a label in exactly one language. This could for example be "F_HOUSE_DESCRIPTION".
In Java you would create a .properties file (by convention 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".
For all other languages, you create other property files, like "messages_de_DE.properties" for the German translation. In that file, you would have key "F_HOUSE_DESCRIPTION" again, this time pointing to "Beschreibung des Hauses".
Now you localization framework should find out which is the locale wanted / needed by the user and present the according translation taking from the according property file to the user.
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.

Related Links

Get .apk by another application
Fragment not added on orientation change
IntentService parallel execution
Change statusbar color on Fragment change [Android Lollipop]
AS3, FLEX - softKeyboardBehavior does not work on android device
Is there a way to know if permissions were removed on the Facebook website
How to close dialog themed Activity
LibGDX - custom shadow mapping
How to add a header and footer spacing in a ListView Android?
Add SeekBar value to initial value AndroidHere i
Android Custom Launcher startActivity() blocks BOOT_COMPLETED intent
Getting Google Maps V2 debug and production key for Android
How to link a part of TextView to an Activity
Android replacement for loadermanager in service
Androidplot - Not displayed in landscape
How can I set the name of application diffrent at the time of “Launcher” and “share via”

Categories

HOME
eclipse
google-spreadsheet
angular2-material
apache-spark-mllib
requirements
grafana
newrelic
dojo
mips
visual-studio-emulator
iis-6
trac
fosrestbundle
github-enterprise
xcodebuild
openbugs
mongodb-csharp
linear-algebra
forgot-password
shortest-path
nodemcu
charles
user-experience
inno-download-plugin
short-url
displaytag
interpreter
perlbrew
xcode-ui-testing
corpus
amazon-quicksight
inversion-of-control
angular-translate
spotipy
tpm
comparable
bioinformatics
fossil
installscript
jpad
tex
filesystemwatcher
verifiable-c
hackintosh
levenshtein-distance
skylink
android-softkeyboard
tcc
dapper-simplecrud
serde
robomongo
zenhub
context-sensitive-grammar
headless
dt
cpu-cache
choice
lrs
burrows-wheeler-transform
vorpal.js
shopping
http-status-code-401
riot
data-protection
thread-sleep
aspen
character-replacement
extjs-grid
finalbuilder
git-ftp
fits
zxspectrum
public-html
uncaught-typeerror
pseudo-class
crowd
webfinger
appserver
alternate
syndicationfeed
tlf
cffile
cascadingdropdown
boost-signals
multiplexing
ikimagebrowserview
saxparseexception
facebook-iframe
interprocess
opml
request-headers
lxr
skype4java
wysiwym
perl5.12
online-storage
leader

Resources

Mobile Apps Dev
Database Users
javascript
java
csharp
php
android
MS Developer
developer works
python
ios
c
html
jquery
RDBMS discuss
Cloud Virtualization
Database Dev&Adm
javascript
java
csharp
php
python
android
jquery
ruby
ios
html
Mobile App
Mobile App
Mobile App