Reputation: 173
I have a base data scheme like this:
My app need to be localization by splitting some of data fields by different display language. For example, "district" should display in different language based on the user's language selection.
One of the solution that i found on the internet is to create another document with language preference. But the drawback of this is that I need to maintain the document(s) together all the time.
is it possible to lookup from another document in FireStore?
Any best practice to do localization in FireStore?
Upvotes: 2
Views: 1668
Reputation: 4262
Firestore is document NoSQL database and this problem is general for all databases of this type. I used once a field type map, however I admit this was not commercial, but just practice. Than it looked like this:
If this will not suite your requirements I can only give you few other question of similar topic:
Multilingual data modeling on MongoDB
How to achieve localisation with NoSQL
How to properly structure localized content in Cloud Firestore?
If you need even more I suggest to study Document based NoSQL databases general solutions.
Hope it will help!
Upvotes: 2