AnsweredAssumed Answered

Multilingual content

Question asked by dbevacqua on Sep 8, 2006

We have a custom content model and we need to deliver different content to people depending both on their preferred language and their geographical location. (By "language" I mean something akin to Java's Locale, e.g. PT-BR or EN-GB - yes, we do need to vary by geographical location as well). Some variations will only be in one property, and for a given entity, some properties may vary by language and others by location, so it is not really feasible to have localised versions of an entity for each combination of language/location, as this would be result in massive duplication of data and would be impossible to maintain.

The sort of model I've come up with would result in content looking something like this (apologies for formatting):

…. name                  <- has aspect "cms:localisable"
………. EN-GB         <- has aspect "cms:localContent"                      
………. EN-GB/Eire   <- has aspect "cms:localContent"                      
…. contact
…. etc

cms:localisable will allow children with aspect cms:localContent
cms:localContent will have references to a language and region (or maybe just Strings - any thoughts?), and then a content property containing the localised value.

I have considered doing it the other way round, i.e.

…. EN-GB
………. name
………. contact
………. etc…
…. EN-GB/Eire
………. name     <- only variations appear here

but this is at odds with the interface we have designed, and I think querying this kind of structure might be more difficult.

I guess the real questions are about performance, but any thoughts about this kind of model would be greatly appreciated - I'm feeling around in the dark here somewhat.

Thanks in advance.

Dominic Bevacqua.