Don't you have three languages on the site already? Is there one of the listed languages it does not switch to? At a first glance of the code I think all you need to do is to just add the new language node in the content section?
I've not tried the code above, and these thoughts are off the top of my head, so I might be wildly wrong, but I'm guessing that the loop setting the "onchange" attribute for the <select> will only set the "onchange" to the last value in the loop ?
Just a suggestion, but how about creating a RelationType for each language, and an event on copy that links the two document IDs with the RelationType of the language being copied to ? That way you know from the <select> what language you're swapping to, and can lookup the single related ID for that RelationType.
Alternatively if using the default "relateDocumentOnCopy" RelationType, then I think you'll have to iterate though each Relation and check to see if it belongs to the path of the tree language being directed to ?
Relate more than 2 documents
Hello
I try to make a multilingual website (umbraco 4.5.2)
My navigation structures is:
- de
>> products
>> contact
- en
>> products
>> contact
- fr
>> products
>> contact
Ive got searched for the following xslt script
This generates a dropdown with 3 options for Germany, English and France
If i change between 2 languages everything is working fine but how can i use a third language?
Hi Dominik
Don't you have three languages on the site already? Is there one of the listed languages it does not switch to? At a first glance of the code I think all you need to do is to just add the new language node in the content section?
/Jan
Hi Jan,
If I use two languages the user is able to switch from parent to child.
But if i use a third language the user is not redirected to the correct child.
An example
The user is on
- de
>> products
and clicks "france" he is not send to:
- fr
>> products
So it works if there is only one relation with one child but not if there are two child notes.
Is there no possibilty to relate more than 2 languages?
How can a multilingual site can be done with more than 2 languages?
It is necessary that the user will stand on the site he is actual at the moment.
Thanks
Hi Dominik,
I've not tried the code above, and these thoughts are off the top of my head, so I might be wildly wrong, but I'm guessing that the loop setting the "onchange" attribute for the <select> will only set the "onchange" to the last value in the loop ?
Just a suggestion, but how about creating a RelationType for each language, and an event on copy that links the two document IDs with the RelationType of the language being copied to ? That way you know from the <select> what language you're swapping to, and can lookup the single related ID for that RelationType.
Alternatively if using the default "relateDocumentOnCopy" RelationType, then I think you'll have to iterate though each Relation and check to see if it belongs to the path of the tree language being directed to ?
Cheers,
Hendy
This sounds good but i am new to umbraco and therefor it is very hard to make this modification.
I used the relation manager to make a new relation.
Perhaps you are able to tell me how I can add the Event and connect both relation types.
Thanks
is working on a reply...