I'm designing a multilingual e-commerce site. Products have different properties. Some properties are different for each language (like color), other properties are the same for all languages (like SKU). Properties are not predefined, for example cars have other properties than espresso machines.
I'd like to design the database schema such that:
- Searching and representing all products from category x in language y is fast
- The amount of duplicate data is low
- I don't want to use files with translations
I'm thinking about using a schema like this:
{
_id: ObjectID("5dd87bd8d77d094c458d2a33"),
multi-lingual-properties: ["name", "description"],
name: { en: "Super fast car",
nl: "Hele snelle auto"},
description: { en: "Buy this car",
nl: "Koop deze auto"},
price: 20000,
sku: "SFC106X",
categories: [ObjectID("4bd87bd8277d094c458d2a43")]
}
Is there a better alternative to this schema? What problems will I encounter when I use this schema?