I have two languages: English and Dutch. When I translate a book page in English I want not only to translate the content of the book, but also its structure. An understandable limitation of combining multiple languages with structure, is that it is near impossible to translate a child page before translating its parent, while keeping its structure intact.
However, I would expect that if one is diligently translating pages top-down, that is to say, from parent downwards to its children, Localizer would keep track of the translated book structures. Say I have a structure like this:
- Projects
-- number one
-- number two
----child of number two
and a Dutch book:
- Projecten - which is a translation of "Projects"
Now, if I am on book page "number two" and press "Translations" I can translate the page, but it will not automatically assume "Projecten" to be its parent. In fact, I can't even manually choose "Projecten" to be the parent in the dropdown list, because the locale is still assumed to be in english, and I only see english books.
I have to switch locale, in order to see the Dutch books.
Shouldn't the locale switch automatically on pressing the tab for translations? And shouldn't a translation of "Number two" automatically assume a translation of "Projects" to be its parent?
cheers.
Comments
Comment #1
Roberto Gerola commented>I have to switch locale, in order to see the Dutch books.
Correct
>Shouldn't the locale switch automatically on pressing the tab for translations?
You mean, clicking the translation in that tab ?
We could decide to do so, yes.
>And shouldn't a translation of "Number two" automatically assume a translation of "Projects" to be its parent?
This is a bit more difficult, because the node are cloned.
It is possible, in every case. We should write specialized cloning routines for every
node type.
Comment #2
ray007 commentedMaybe not for every node-type (which is impossible considering cck), but for things with relationships between nodes.
Things coming to mind here:
- books
- cck noderef fields
- node family module
I'm sure there are some more ...
I haven't looked at the node cloning here yet, but maybe also have a look at the clone-node module?
Comment #3
Roberto Gerola commentedYes, i used the routines of node clone module when I started writing Localizer.
Unfortunately, it has a very basic support for nodes.
It is designed only for page and story in their original Drupal version.
I mean, not extended, for example, by external modules.
Comment #4
ray007 commentedSe we'll have the base for a better "clone node" module inside of localizer?
If we really do, I'll make a gui and throw out the original module from my installation ;-)
Comment #5
Roberto Gerola commentedIt is a little more generalized routine.
Take a look :
Comment #6
kdebaas commentedI'm not sure I understand the discussion on the node clone module. However, I have the feeling I am talking about something simpler, correct me if I am wrong:
When I click the translate tab on a book page, a new node is created that already knows it is a book. That means it knows it can have a parent. And indeed, in the drop down list, I can choose another already existing book page to become the parent of the node that I am creating.
When I click on "create child page" at the bottom of a book page, I am also creating a new node that knows it is a book. It however already assumes the previous book page to be its parent. I.e. the drop down list defaults to the node on which I chose to add a child.
I remember vaguely from when I was experimenting with the i18n module, that it actually did maintain the hierarchy into the translation, as long as I was dealing with a pure book content type, and as long as I respected the order of translating parents before their children. It however didn't work when translating children of book pages that were not originally of the book content type, but were, for example, of the content type "story" that were included into a book hierarchy by the "Outline" tab. Those would be "orphaned", and would have to manually be placed into the book hierarchy again.
I don't currently have a Drupal site setup with i18n, so I can't replicate and confirm this.
ray007 is spot on though, because while for my own sake I tried to formulate a simple question, what is really behind it is me trying to get myself to understand how to set up and think of a site that is both multilingual, and structured with relationships between nodes, which is not so simple at all.
Comment #7
Roberto Gerola commented> I'm not sure I understand the discussion on the node clone module. However, I have the feeling I am talking
> about something simpler, correct me if I am wrong
You are right.
The support for what you need isn't yet available.
I see If I can implement it soon.
Comment #8
kdebaas commentedcleaning up