You are viewing a plain text version of this content. The canonical link for it is here.
Posted to users@jackrabbit.apache.org by Sascha Rodekamp <sa...@googlemail.com> on 2011/09/01 11:06:48 UTC

multilanguage best practices

Hi David, hi List

i had some thoughts about the same problem. What is best practice for multi
language nodes.

Maybe you can share some experience you made during the last month with your
solution?

I prefer the "One Tree with Translation" solution, because if i have i.e.
product contents in different languages it is possible to switch between the
languages and simply determine a fallback.

A Product Gizmo52 can have a description in eng, de, fr the node tree could
look like:

/products/gizmo52/eng
/products/gizmo52/de
/products/gizmo52/fr

I could also easily determine which description languages are available for
the product gizmo52 (more easily than with a different tree for each
language).

I also thought of a proper way to map this structure to OCM classes.
I.E. a content object with a collection of language objects?!

What do you think?

Cheers
Sascha

Re: multilanguage best practices

Posted by Sascha Rodekamp <sa...@googlemail.com>.
Hi, ok that looks like the same approach i chose.

let's put this solution in a proper OCM model :)

Cheers

2011/9/1 Sverker Abrahamsson <sv...@abrahamsson.com>

> Hi
> The reason that I extend nt:file/nt:folder is this repository mimics a file
> system. I've extended them to lt:file/lt:folder which have a multivalued
> child node called lt:i18n which has one instance per locale.
> /Sverker
>
> > -----Original Message-----
> > From: Sascha Rodekamp [mailto:sascha.rodekamp.lynx.de@googlemail.com]
> > Sent: den 1 september 2011 11:23
> > To: users@jackrabbit.apache.org
> > Subject: Re: multilanguage best practices
> >
> > Hi,
> > so you have one node for all locals? Why you use nt:file/ nt:folder?
> >
> >
> >
> > 2011/9/1 Sverker Abrahamsson <sv...@abrahamsson.com>
> >
> > > Hi
> > > The approach I've taken is to extend nt:folder and nt:file to add an
> > i18n
> > > child node with the different locales.
> > > Best regards
> > > Sverker
> > >
> > > > -----Original Message-----
> > > > From: Sascha Rodekamp
> > [mailto:sascha.rodekamp.lynx.de@googlemail.com]
> > > > Sent: den 1 september 2011 11:07
> > > > To: users@jackrabbit.apache.org
> > > > Subject: multilanguage best practices
> > > >
> > > > Hi David, hi List
> > > >
> > > > i had some thoughts about the same problem. What is best practice
> > for
> > > > multi
> > > > language nodes.
> > > >
> > > > Maybe you can share some experience you made during the last month
> > with
> > > > your
> > > > solution?
> > > >
> > > > I prefer the "One Tree with Translation" solution, because if i
> > have
> > > > i.e.
> > > > product contents in different languages it is possible to switch
> > > > between the
> > > > languages and simply determine a fallback.
> > > >
> > > > A Product Gizmo52 can have a description in eng, de, fr the node
> > tree
> > > > could
> > > > look like:
> > > >
> > > > /products/gizmo52/eng
> > > > /products/gizmo52/de
> > > > /products/gizmo52/fr
> > > >
> > > > I could also easily determine which description languages are
> > available
> > > > for
> > > > the product gizmo52 (more easily than with a different tree for
> > each
> > > > language).
> > > >
> > > > I also thought of a proper way to map this structure to OCM
> > classes.
> > > > I.E. a content object with a collection of language objects?!
> > > >
> > > > What do you think?
> > > >
> > > > Cheers
> > > > Sascha
> > >
> > >
> >
> >
> > --
> >
> > Sascha Rodekamp
> >     Visit the new german OFBiz Blog: http://www.ofbiz.biz
> >     Lynx-Consulting GmbH
> >     Johanniskirchplatz 6
> >     D-33615 Bielefeld
> >     http://www.lynx.de
>
>


-- 

Sascha Rodekamp
    Visit the new german OFBiz Blog: http://www.ofbiz.biz
    Lynx-Consulting GmbH
    Johanniskirchplatz 6
    D-33615 Bielefeld
    http://www.lynx.de

RE: multilanguage best practices

Posted by Sverker Abrahamsson <sv...@abrahamsson.com>.
Hi
The reason that I extend nt:file/nt:folder is this repository mimics a file
system. I've extended them to lt:file/lt:folder which have a multivalued
child node called lt:i18n which has one instance per locale.
/Sverker

> -----Original Message-----
> From: Sascha Rodekamp [mailto:sascha.rodekamp.lynx.de@googlemail.com]
> Sent: den 1 september 2011 11:23
> To: users@jackrabbit.apache.org
> Subject: Re: multilanguage best practices
> 
> Hi,
> so you have one node for all locals? Why you use nt:file/ nt:folder?
> 
> 
> 
> 2011/9/1 Sverker Abrahamsson <sv...@abrahamsson.com>
> 
> > Hi
> > The approach I've taken is to extend nt:folder and nt:file to add an
> i18n
> > child node with the different locales.
> > Best regards
> > Sverker
> >
> > > -----Original Message-----
> > > From: Sascha Rodekamp
> [mailto:sascha.rodekamp.lynx.de@googlemail.com]
> > > Sent: den 1 september 2011 11:07
> > > To: users@jackrabbit.apache.org
> > > Subject: multilanguage best practices
> > >
> > > Hi David, hi List
> > >
> > > i had some thoughts about the same problem. What is best practice
> for
> > > multi
> > > language nodes.
> > >
> > > Maybe you can share some experience you made during the last month
> with
> > > your
> > > solution?
> > >
> > > I prefer the "One Tree with Translation" solution, because if i
> have
> > > i.e.
> > > product contents in different languages it is possible to switch
> > > between the
> > > languages and simply determine a fallback.
> > >
> > > A Product Gizmo52 can have a description in eng, de, fr the node
> tree
> > > could
> > > look like:
> > >
> > > /products/gizmo52/eng
> > > /products/gizmo52/de
> > > /products/gizmo52/fr
> > >
> > > I could also easily determine which description languages are
> available
> > > for
> > > the product gizmo52 (more easily than with a different tree for
> each
> > > language).
> > >
> > > I also thought of a proper way to map this structure to OCM
> classes.
> > > I.E. a content object with a collection of language objects?!
> > >
> > > What do you think?
> > >
> > > Cheers
> > > Sascha
> >
> >
> 
> 
> --
> 
> Sascha Rodekamp
>     Visit the new german OFBiz Blog: http://www.ofbiz.biz
>     Lynx-Consulting GmbH
>     Johanniskirchplatz 6
>     D-33615 Bielefeld
>     http://www.lynx.de


Re: multilanguage best practices

Posted by Sascha Rodekamp <sa...@googlemail.com>.
Hi,
so you have one node for all locals? Why you use nt:file/ nt:folder?



2011/9/1 Sverker Abrahamsson <sv...@abrahamsson.com>

> Hi
> The approach I've taken is to extend nt:folder and nt:file to add an i18n
> child node with the different locales.
> Best regards
> Sverker
>
> > -----Original Message-----
> > From: Sascha Rodekamp [mailto:sascha.rodekamp.lynx.de@googlemail.com]
> > Sent: den 1 september 2011 11:07
> > To: users@jackrabbit.apache.org
> > Subject: multilanguage best practices
> >
> > Hi David, hi List
> >
> > i had some thoughts about the same problem. What is best practice for
> > multi
> > language nodes.
> >
> > Maybe you can share some experience you made during the last month with
> > your
> > solution?
> >
> > I prefer the "One Tree with Translation" solution, because if i have
> > i.e.
> > product contents in different languages it is possible to switch
> > between the
> > languages and simply determine a fallback.
> >
> > A Product Gizmo52 can have a description in eng, de, fr the node tree
> > could
> > look like:
> >
> > /products/gizmo52/eng
> > /products/gizmo52/de
> > /products/gizmo52/fr
> >
> > I could also easily determine which description languages are available
> > for
> > the product gizmo52 (more easily than with a different tree for each
> > language).
> >
> > I also thought of a proper way to map this structure to OCM classes.
> > I.E. a content object with a collection of language objects?!
> >
> > What do you think?
> >
> > Cheers
> > Sascha
>
>


-- 

Sascha Rodekamp
    Visit the new german OFBiz Blog: http://www.ofbiz.biz
    Lynx-Consulting GmbH
    Johanniskirchplatz 6
    D-33615 Bielefeld
    http://www.lynx.de

RE: multilanguage best practices

Posted by Sverker Abrahamsson <sv...@abrahamsson.com>.
Hi
The approach I've taken is to extend nt:folder and nt:file to add an i18n
child node with the different locales.
Best regards
Sverker

> -----Original Message-----
> From: Sascha Rodekamp [mailto:sascha.rodekamp.lynx.de@googlemail.com]
> Sent: den 1 september 2011 11:07
> To: users@jackrabbit.apache.org
> Subject: multilanguage best practices
> 
> Hi David, hi List
> 
> i had some thoughts about the same problem. What is best practice for
> multi
> language nodes.
> 
> Maybe you can share some experience you made during the last month with
> your
> solution?
> 
> I prefer the "One Tree with Translation" solution, because if i have
> i.e.
> product contents in different languages it is possible to switch
> between the
> languages and simply determine a fallback.
> 
> A Product Gizmo52 can have a description in eng, de, fr the node tree
> could
> look like:
> 
> /products/gizmo52/eng
> /products/gizmo52/de
> /products/gizmo52/fr
> 
> I could also easily determine which description languages are available
> for
> the product gizmo52 (more easily than with a different tree for each
> language).
> 
> I also thought of a proper way to map this structure to OCM classes.
> I.E. a content object with a collection of language objects?!
> 
> What do you think?
> 
> Cheers
> Sascha


Re: multilanguage best practices

Posted by Lukas Kahwe Smith <ml...@pooteeweet.org>.
On Sep 1, 2011, at 11:06 , Sascha Rodekamp wrote:

> Hi David, hi List
> 
> i had some thoughts about the same problem. What is best practice for multi
> language nodes.
> 
> Maybe you can share some experience you made during the last month with your
> solution?
> 
> I prefer the "One Tree with Translation" solution, because if i have i.e.
> product contents in different languages it is possible to switch between the
> languages and simply determine a fallback.
> 
> A Product Gizmo52 can have a description in eng, de, fr the node tree could
> look like:
> 
> /products/gizmo52/eng
> /products/gizmo52/de
> /products/gizmo52/fr
> 
> I could also easily determine which description languages are available for
> the product gizmo52 (more easily than with a different tree for each
> language).
> 
> I also thought of a proper way to map this structure to OCM classes.
> I.E. a content object with a collection of language objects?!
> 
> What do you think?


think that we are now settling on an approach where every node has subnodes with the translations. while these nodes should still be structured sensibly, the actual structure on the website is separate and consists of references to the actual content nodes. this way its still possible to have different structures for different languages. we are going with this approach since we want to use the same approach for handling driving different websites from the same content.

in this way there is no difference between how to handle mobile vs. desktop and english vs. german. all are just separate navigation tree's referencing translated nodes. note that if content node A has subnodes with translations "en", "de" and "it" we will always reference content node A and just decide based on the context which language to use. now if a content editor wants to create a separate navigation tree for german users of the mobile site the context will obviously dictate that we will try to get the "german" subnode, but if unavailable then we can apply fallback rules (aka if an editor decides to reference a content node that isnt translated to german on the german mobile site, then the end result will just be that english content will be shown).

regards,
Lukas Kahwe Smith
mls@pooteeweet.org