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

Large images as background in Android
Changing fragments
Excel jar poi 3.13 HTC not reading file
Finish some activities from stack
How to send key down and key up events separately on android using ADB?
Android, java.lang.NoSuchFieldError: …R$layout.e
Best way to add dragable images onto another image in android
Add Payload to Volley post request
Encrypt and decrypt with password in Android
Save Activity Instance And do not create in second Loading
Error while connecting phone with android studio
Client/Server Bluetooth Connections Development
iOS Android - How to create a download link for an app?
Invalid URI exception in DocumentsContract.getDocumentId (uri)
Why Listview setOnItemClickListener can't work
Multiple hints or multiple style for the same hint in edittext

Categories

HOME
oracle12c
hyperlink
delphi-7
twig
powerpoint
youtube-data-api-v3
interface
themes
devise
google-cloud-functions
vxml
limit
elasticsearch-5
syntaxnet
gson
redis-sentinel
angular-dart
flatpak
gruntfile
nim
rubymotion
appirater
spotipy
errbot
winpe
ntp
kudu
dumpbin
sammy.js
contacts
password-protection
bc
ods
apns-php
google-data-api
jvmti
visa
tcc
importerror
snapchat
puredata
flask-restful
amq
tinkerpop
edit
dt
d3-force-directed
cd-burning
django-1.10
sandcastle
redistributable
winusb
envi
jclouds
clipboard.js
query-by-example
sklearn-pandas
fink
pushbots
rasterize
iokit
poppler
zxspectrum
broadband
infosphere-spl
dbaccess
viewer
browserify-shim
administration
cocos3d
sphinxql
scmmanager
joomla-template
web-notifications
midlet
qtconcurrent
vfs
wcf-configuration
relative
screen-size
exponentiation
webdev.webserver
lr
commerceserver2007
binomial-heap
isapi-extension
qtabbar
burndowncharts
django-piston
lxr
purepdf
dojo-dnd
localizable.strings
product-management
xslcompiledtransform
movieplayer

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