[opencms-dev] Multilingual sites - Browser's AcceptedLanguages

Peter Olsson s.o.peter.olsson at telia.com
Sun Jul 16 01:21:34 CEST 2006


Hi,

Thanks for your input!

Christian Steinert wrote:
> Peter Olsson schrieb:
>> Hi again!
>>
>> I'm now in the next step towards using OpenCms for a multilingual site.
>> And that is the navigation.
>>
>> If I had chosen a solution with siblings I guess this had worked just
>> fine by setting the file properties Navigation Text and Title for the
>> different siblings. But now I didn't :-)
>>
>> Have any of you any experiences in this area you could share?
>>
>> I have seen suggestions about using both ResourceBundles and define new
>> properties for each language in the files (Title_de, Title_sv, ...). 
>
> I don't see the connection between resource bundles and file properties.

I meant that I had seen these two separate solutions. So there are no 
connection to see :-)

> If you have static pieces of text that are alway there, but of course
> different for each language, then you use one resource bundle, make sure
> that your keys don't collide with those of opencms and that's that.

Good point, I will think about that.

> If you have NAVIGATION info, then you usually store it as file
> properties of your files. You cannot store more than one language per
> sibling anyway, so I don't see where siblings would help you (compared
> to just having independent replicas in the other languages) with pulling
> out the navigation info in a way that works with the accept language.
> (Corrections are welcome, if somebody thinks that there is a more
> elegant solution than having two siblings as containers for the language
> related file properties.)

I don't think I understand what you mean. But the function with several 
languages in the same file is great when handling the content in the 
Workplace. The problems arise when you want the properties in different 
languages. When you then have 12+ languages and uses siblings it gets a 
lot to keep track of in the Workplace.

But I need to learn more about how the navigation is built before I can 
understand all details and figure out a solution. If I do I will let you 
all know.

> But
>> since I'm still unexperienced with OpenCms I can't yet see what the
>> consequences of the different solutions are in other parts of OpenCms.
>>
>> My idea is that the navigation should be translated in a process of its
>> own. That is, the navigation should be available in the chosen language
>> even if the file/folder it links to isn't yet translated.
>
> I think that I understand the problem, but I don't know of an easy
> solution. Of course you can have replicas or siblings for a given page
> in another language - even before the content has been translated to
> that language. But opencms does not help you with replicating anything
> across languages.

Yes you are right, I noticed that you need to enable the element you 
want to add content to for each language. If it is not enabled it will 
not be "seen" by OpenCms.

> I implemented something like this by creating my own resource type, but
> I'm afraid that the code is too specific and it took so long to get it
> to work that I don't know whether I can recommend that approach...

Probably not :-) I haven't learnt about the resource types yet but I 
will keep this in mind. But I will probably not put in this much effort 
on this. At least I hope it want be necessary...

> I hope you understood you correctly. I think the handling of
> cross-language file properties and the inability to replicate siblings
> to other languages, if they are created in one languages are currently
> the biggest weaknesses when trying to create multilanguage sites.

I'm not sure because I don't now exactly what you mean with "created in 
one language".

Is there any other common use of siblings than the use with multiple 
languages?

> On the other hand I don't know if there's an easy solution, because I
> don't know if everybody has the same expectations of how file property
> internationalization should work if if were better supported...

Ok, but good to know that I haven't missed or misunderstand things so I 
do something that is already available in OpenCms or as an existing module.

/Peter




More information about the opencms-dev mailing list