jackrabbit-users mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From David Buchmann <da...@liip.ch>
Subject multilanguage best practices
Date Wed, 02 Mar 2011 18:29:25 GMT

hi list,
we are currently building an application using jackrabbit as storage
backend. one problem we are unsure about is how to store multilingual
content and navigation structures. i see 3 ways of doing it, from simple
to complex.
i would be very happy to have input from people with experience in the
field. what do you use? what makes sense? do i miss something, are there
more clever ways of doing this?

i found one very old post about it, but maybe there is more to say about
this since then? please also note that we are not only considering
content translation but also navigation structures.

1. language agnostic
navigation: one navigation tree per language. in the root of the
navigation, separate between the languages (i.e. have nodes "en", "fr",
"de", ...) and then just attach nodes below as usual.
nodes: no relation between translations of the same content.
+ trivial to implement
- no "language fallback" (use other language in case of incomplete
- no link between translations
- up to backend user to create same navigation tree and translate things
- language neutral elements of nodes are duplicated
- when aggregating nodes, must be careful about path (language base
element) to not show duplicate content in different languages

2. linking
navigation: still one navigation tree per language.
nodes: content nodes have a reference to a node that is the same content
in another language.
(this is the drupal way of doing things. they only do it this way
because multilanguage was added on top of the original single-language
+ can be added "on top" of a system without translation
+ nodes can live inside their language' navigation tree
- uses lots of node references
- still no synchronized navigation tree
- language neutral elements of nodes are still duplicated or must be
synchronized by the application
- when aggregating nodes, must be careful about language to not show
duplicate content

3. multilingual nodes
navigation: one tree per language? or have urls in just one language? or
one tree with translations?
nodes: have a translation:[langcode] child for each language.
+ the same thing is the same in all languages
+ language neutral elements are properly handled
+ we have a fallback if a node is not existing in the preferred language
+ aggregating works without the issues of the other approaches
- still no synchronized navigation tree
- nodes either live outside the tree and all tree elements link to them,
or there is a primary language and the others tree elements link to
their respective elements

i like 3) best. however, i am unsure about the best way to model
navigation structures with 3).
tree per language allows to have different trees which can be a feature,
but its not evident how to avoid different trees when this is not wanted.
urls in just one language is very bad for user friendlyness and SEO
tree with translations sounds very bad performancewise. we directly map
paths to retrieve nodes from jackrabbit, meaning the node names show up
in the url. if there would be translations of those names, we would have
to manually walk the tree and look at the translations.

Liip AG // Agile Web Development // T +41 26 422 25 11
CH-1700 Fribourg // PGP 0xA581808B // www.liip.ch

View raw message