Best approach for multi-language data?

Hi all,

I'm currently building my first webapp with Neo4j (GRAND stack). I'm trying to implement multi-language data and wondering what the best/ recommended approach is.

One approach would be to include multiple fields on each node, eg: en_size, fr_size, jp_size.

Another option would be to use different nodes for different languages, eg: en_nodeA, fr_nodeA, jp_nodeA.

Would love to hear what your recommendations are.

I should perhaps clarify that my data will contain many different strings in different languages and so an approach based on reoccurring values (such as red, rouge, あかい) would not work here.

I had the same question. How did you solve this? This is what chatgpt suggested. It seems you can use the index of the first to find the corresponding in fullNameTexts. Not really graceful.

fullNameLangs: ["en_GB", "en_US", "es_ES"],
fullNameTexts: ["a", "b", "c"],

Data modeling questions (regardless of the database type) need context to answer. An array of languages and translations like that - my initial reaction is "nah, I wouldn't do that." If there is (and always will be) a fixed set of languages, then the property approach makes sense to me. If not, then I'd look perhaps at having separate nodes for each language or some other approach.

Currently I playing with the idea of adding descriptions/notes to relationships. The idea is then, that if the graph is visualised, an on mouse over event will show the description in the users language

MATCH (d:Database {name: 'Neo4j'}), (m:Message {name:'Hello World!'})
CREATE (d)-[:relationship5 {description: "this is a test", startDate: date("2024-01-02"), endDate: date("2024-01-03") }]->(m)

is there an example case that shows this multi language use.