jackrabbit-users mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Brian Thompson <elephant...@gmail.com>
Subject Re: Internationalization of property values
Date Fri, 02 Mar 2007 17:55:31 GMT
Off the top of my head, I might encode the data as an XML string with a 
language declaration as the first element.  Something like

XML declaration
<lang="de"><data>(title data in German here)</data></lang>

or something similar.


Waldemar Baraldi wrote:
> Thanks guys, I think I will implement something like Brian's option 2 (very
> similar to Tobia's suggestion).
> By the way, Brian, how would you recognize to which language a value in the
> multi-valued property corresponds in Option 3? I ask because I haven't
> discarded it completely :-).
> Regards,
> Waldemar
> -----Original Message-----
> From: Brian Thompson [mailto:elephantium@gmail.com] 
> Sent: Wednesday, February 28, 2007 11:45 PM
> To: users@jackrabbit.apache.org
> Subject: Re: Internationalization of property values
> The way I see it, you have three options:
> Option 1:  Separate nodes, one for each language.  If you maintain separate
> workspaces (again, one for each language), you can create the initial movie
> node and clone() it to the other language workspaces. 
> Each language-version of the movie node will then share the same UUID,
> making lookups easier (just log in to the appropriate workspace when you're
> looking for a particular language's version of movie data).
> If you don't go with multiple workspaces, it gets trickier - you could build
> a logical linked list with node references, but that seems harder to deal
> with.
> Option 2:  One movie node, multiple child nodes for languages.  Create all
> the child nodes as the same type (movie:properties or something similar),
> and put your properties on the child nodes.
> Option 3:  Make each property multi-valued.  This keeps all language
> versions of each property all in the same place, simplifying insertion and
> retrieval.  The downside is that, every time you retrieve any property, you
> are forced to retrieve all language versions of it.
> Hope this helps,
> -Brian
> Waldemar Baraldi wrote:
>> Hi all,
>> I want my nodes to have internationalizable properties. Let's say a 
>> node of type movie has a string property called 'title', I want to set 
>> the value to that property in different languages. I don't want to 
>> have multiple nodes (for the same movie) just to maintain translations.
>> I believe the JCR standard doesn't support something like that. I'm 
>> thinking about how to implement something like this.
>> Any help, ideas or shared experience will be greatly welcome.
>> Thanks in advance.
>> Waldemar

View raw message