I am not sure if this is the correct component as the books are handled by an automatically generated menu within a system block, with no apparent interaction with i18n

I have created 8 books in English as the primary language
I then tried to translate some pages of these books in French

The core system did not handle them properly: the translated pages were no automatically outlined and did not appear. When outlining them manually according to the original pages, all pages appear whatever language is selected. Th book itstself cannot be translated unless a new book is created.

So I installed i18n. This makes the foreign language pages not appearing as expected when selecting English
However, when selecting Fench, the entire Book bloc disappears.

The problem might be simply that the only way to handle translation would be to create one block per language, but this is not convenient at all and would not even require i18n, while this module is supposed to bring some smart features. Also, this even seems impossible as the book block is generated by the system and cannot be cloned to my knowledge.

I did not found many references about this issue, it seems either
- that book translation is not used by anyone
- the book translation works in a undocumlented way that I did not found
- this is a bug that I am the only one experiencing

Thanks for fixing or help

Regards
Jean Vieille

Comments

icouto’s picture

Status: Active » Closed (fixed)

jvieille: it may be that you found a genuine bug, or it may be that because of the lack of thorough documentation for the modules, it was not clear to you what should be the proper procedure for achieving what you want. I sympathise with you, because I suffered *many* hours of frustrating experimentation, before I finally worked out what was the 'proper' procedure to achieve exactly what you are proposing. Like you, I have sites that are multilingual, and that wanted to have books appear in different languages.

I will try to give you a description of what I did, which worked fine for me. Like you, I am only a newbie at this, so there may be steps missing here, or something vital I've overlooked. If it doesn't work for you, please do not kill me! :-)

REQUIREMENT
I need to setup a book in my site, which will be available in 2 languages. We assume that the site already has the second language installed and enabled. We will call the 2 languages 'language-1' and 'language-2'.
The user should be able to select in which language they wish to see the book, by selecting a language from the site's central language menu.
While browsing through the book, the user should be able to switch to the corresponding page in the other language, by using the site's language menu, or by selecting a language link at the bottom of the page.
The book navigation block will be displayed in the site, and all links in it should automatically translate to reflect the translated pages of the book, depending on the language currently chosen.

Step 1) Set multilingual system settings
Go to 'Site Configuration -> Multilingual System', and make sure that under "Content selection" you have "Current language and language neutral" selected. This will ensure that only content in the currently selected language, or content that is 'language-neutral', will be displayed in menus throughout the site.

Step 2) Enable translatable multilingual content for Book Page
The book is going to be entirely made up of nodes of content type 'Book Page'. So, we need to tell Drupal that we want this type of content to be language-aware, and that we want each node to be able to have corresponding 'translations'.

Go into 'Content management -> Content types -> Edit Book Page'. Under "Workflow settings", make sure that you select "Enabled, with translation", and click the button "Save content type".

Step 3) Enable and configure the "Book navigation" block
Go into 'Site building -> Blocks', and enable the "Book navigation" block - ie., set it display in an active page region, such as the left or right column of the site.
Then, click the 'configure' link for the block. In the block configuration page, make sure that under "Multilingual settings" you select "All languages". This will ensure that the block is visible regardless of the language being used to browse the site.
Last of all, under "Book navigation block display", select "Show block only on book pages". This will ensure that only the book the user is currently in will be displayed.
Click "Save block".

Step 4) Start the book in language-1
Go to 'Content management -> Create content -> Book Page', to create a new Book Page. This page will be the 'cover page' for our new book, and the page's title will define the book's title. Enter all details as required - ie., if you want a link to the book in one of your menus, specify that under "Menu settings" - including the body, in language-1.
Under "Language", make sure language-1 is selected.
Under "Book outline", select "create a new book".
Click "Save". You new book - in language-1 - has been created.

Step 5) Start the book in language-2, by translating language-1
Now, we need to start the language-2 version of the book. We do this by TRANSLATING the language-1 version of our first page.
Navigate to the first page of your book in language-1, which you just created. While you are viewing the page, next to the "View", "Edit", "Track" buttons you should see a "Translate" button. Click on it.
You are taken to a page that list all the translations for the current page. In it, you should be able to see, that there is still no translation for this page in language-2. Click the 'add translation' link.
You are now in a 'Create new Book Page' page, and you should follow the same steps described in Step 4 above. Note that the 'Language' menu is already selected for you. Under "Book outline", make sure you select "create a new book". Remember that the title of this page will be the title of the book in language-2.
Click "Save".

Step 6) Adding pages to the book in language-1
To add a page to the book in language-1, create a new book page, select the language as 'language-1', and under "Book outline" select the location in the book that this page should be. You can also create pages by navigating to an existing book page, and clicking one of the 'create' links at the bottom of the page - ie., 'create child page', etc.

Step 7) Adding corresponding pages to the book in language-2, by translating language-1
When you want to add a corresponding, translated page to the book in language-2, navigate to the page in language-1, and click on the "Translate" button at the top. Then, click on the 'add translation' link for language-2. Set options for the new page as appropriate, and save.

Note that when you are navigating through the pages of your book, the book navigation menu displays in the current language.

I hope this helps.

Admins - if you find that these instructions are useful, please feel free to add them to the i18n manual.

AaronCollier’s picture

Status: Closed (fixed) » Fixed

Issues should remain set at "fixed" for 2 weeks before closing - it allows others to see the solution.

jvieille’s picture

Thank you for the very clear explanation. I well diserves to be in the i18n manual, potentially saving a precious time.

This is actually one of the senariii I experimented: It did not work at all for me with i18n
Without i18n, both books are displayed

By the way, what i18n does here? Is it supposed to handle the filtering, authorizing only the elements in the matching language to display?
Isn't a basic localization capabillity? other contents than books are correctly filtered without i18n

AaronCollier’s picture

Title: Book Translation - i18n makes the book block disapearing when not selecting the main language » Documentation for Books with i18n
Component: Module i18nblocks » Documentation
Category: bug » task
Status: Fixed » Active
jvieille’s picture

Title: Documentation for Books with i18n » Translaing Books with i18n
Component: Documentation » Miscellaneous
Priority: Critical » Minor

I made a new try, following step by step your explanation: it worked!
http://drupal.org/comment/reply/305379/1006814#comment-1005372

The only problem is that the 2 set of books (original English and French translation, I have 8 of that) appear all together in the menu block when selecting some administative tasks such as listing content. This does not seem to be an issue for the site visitors. It was probably my initial problem.

Also, when translating a page, it does not get the current outline, it automatically creates a new book.

Those are very minor issues however.

icouto’s picture

@jvieille: good to hear that things are working better for you now!

You seem to have found 2 bugs. Please, if you can, do a search do see if they have not already been reported - and if they haven't, please DO report them (1 bug per ticket). This is the best way to help the developers improve the module! :-)

jvieille’s picture

I begin to understand the rules...
I really appreciate the constructive exchanges between Drupal users and developpers. I am new both in Drupal and "free software world".
This really a great experience.

I'll follow your suggestion (I have to check and describe more accurately the exact issue)
I'll do my best to help making this project even better.

jvieille’s picture

Title: Translaing Books with i18n » Translating Books with i18n: translated pages are not outlined automatically
Category: task » feature

I identified better this issue:

When translating a book page, the new page is unassigned though the originating page and book are known by Drupal.

It would be nice to have the outline automatically set when adding a translation page

Jose Reyero’s picture

Status: Active » Fixed

Added to the handbook, http://drupal.org/node/313276

Thanks

Anonymous’s picture

Status: Fixed » Closed (fixed)

Automatically closed -- issue fixed for two weeks with no activity.

Elektordi’s picture

I've got the same problem on my website...
For now, I have to create all pages in all language (copy-paste from English), marking them "untranslated", recreate the outline in all languages, and then let translators translate them!

wretched sinner - saved by grace’s picture

Category: feature » bug
Status: Closed (fixed) » Active

I have the same as the previous poster. I followed the instructions, but when I translate a page, it does not fit to the existing outline, so I have to create a new one.

Is this the way it is supposed to work (eg a different book for each language, but linked?) If so, can the documentation be updated to reflect this.

jvieille’s picture

My impression is that it is the expected behaviour.
It would be nice to have a book outline sync in all languages, but would prevent some language specifics. As an option, it would be more challenging for developper for a quite limited value.
I would vote to keep it like this, but as you said, to improve the documentation. I would alos add a warning like "you'll need to fix your book's outline for this transalted content"

AaronCollier’s picture

Category: bug » feature

This is definitely expected behavior and not a bug. If you have something to add to the documentation above, please suggest it. Note Step 5 which says you must create a new book for the pages being translated.

geraldme’s picture

Version: 6.x-1.0-beta3 » 6.x-1.x-dev

I am not sure if this is a good solution. The result will be I have a book navigation at the top of each book page and also the same navigation at the bottom of all book's outline pages. I view the book outline as the book's table of content. So would it be better to separated book outline with book page where the book outline can be translated and the link to each page (the book content) could point to a correct page according to the selected language. I also use the booktree module to expand the entire outline of a book in a page.

I think I can emulate a book TOC with block but the process of building a book is a bit cumbersome. First build the outline using list in a block. Then add book page. Then update the link in the TOC. Then translate page. And then translated the link of the TOC to the translated book page. It could be great if I can just adding book page to build TOC as the book module currently doing and the TOC will automatically updated after a book page is translated.

AaronCollier’s picture

I think that your first paragraph is a separate issue than what is listed here. A book outline (or TOC or what have you) is automatically generated by the module. If you do not want to have the book outline appear on every page, then you can control that with the block called "Book navigation" - you can move it from the top of the page to a sidebar, or just turn it off. If you want to create a page that is just a table of contents, then when you create the book you can leave the uppermost page blank (or have a short summary, if you like). The pages that are below that page will be automatically added to that page.

The block is created on its own, and so I don't think you need to create the block first. All the pages are automatically added to the block and will appear based on the language specified. If you want to have the block have different characteristics, such as automatically expanding or something else, that is definitely a different issue and belongs to the Book module, not internationalization.

Aleksic’s picture

Priority: Minor » Normal

So whan create new book content how will user know which book to select if like in my case language is similar like Serbian, Bosnian, Croatian, Montenegro languanges. Serbian use cyrillic and latin so if in latin for example City in all three languange is "Grad" so how will user or admin know which is good book to outline. They must look to any book????
So if some site like Wikipedia have all languanges how meny book admin and/or users must create and WHY.

mani.atico’s picture

I have a question: if the expected behavior is NOT to synchronize book outlines, what is the "Book outline (with the translated parent)" option inside the content type's "Synchronize translations" fieldset all about?

It will be nice if both parent and weight were synchronized between translations. I'm missing something?

kraguel’s picture

In my opinion several translations of the same book must share the same outline (i.e. not creating a new book and outline for each translation). If there are some language specifics then create different books for each language.

tammo’s picture

#18 and #19: I fully agree with you. Currently I am feeding my site with 5 different translations of the same book and I find it extremely annoying that everytime I add a translation of a page, I have to "hook" the new page to the book, actually rebuilding the structure of the book for each translation.

I would expect that when you translate a page indeed at least the parent and the weight will be known to the system, although I am aware of difficulties of translating pages when the parent page had not yet been translated...

I guess all engineers are busy engineering D7, so no new updates to be expected here. I hope it will be in D7 then...

Tammo

avi.wollman’s picture

if i could manually export a book outline in one language and import it into another language it would be enough. it's a pain when translating the outline of 4 languages.

brucepearson’s picture

The Translation Management module may help with this. http://drupal.org/project/translation_management
As well as providing a unified interface for translation and an interface to translation services, it also handles books and book hierarchy.

When a book page is translated it sets the parent page to the translated parent and sets the weight so that the translated pages are in the same order as the original book.

http://drupal-translation.com/content/setup-multilingual-site has been translated using this method.

LarsKramer’s picture

Another possible solution might be NOT to use the book module for creating multilingual books, but the taxonomy module, creating a vocabulary "Books" and setting Translation mode to "Localize terms". And use the Views module to list content, optionally together with http://drupal.org/project/select_translation. Then the various titles of books, chapters and sections could easily be translated using http://drupal.org/project/translation_table.

seb7’s picture

I think a have a way to have one only book for multilingual contents.

1. Create the root page of the page in 'independant language'.
2.1 Create the other pages in a defined language, (you'll have a warning This node has no translated parent, so no book selected
2.2 choose the the parent page (book outline)
2.3 Save
3. Translate using translate tab .

Everyting seems to be ok on front site ...

... but :
Problem 1 : The root page can not be translated
Problem 2 : All the elements are then duplicated (or x3 if 3 languages, etc) in the admin page where you can reorder the book pages ( admin/content/book/)

Solutions for theses probs could be avoid showing root page using another static page or make module to have that page replaced by another one localized.
Make a module to filter pages by language (but then you'll have to take care to keep your outline structure consistent in each language)...

That's not deeply tested ,
That's just a hack, i think using taxonomy may be better for multilingual contents ...

(What about that in drupal 7 ?)

wadmiraal’s picture

I created a module to address this issue. But it's still pending for a CVS account (http://drupal.org/node/791252)

It's still quite basic, more a proof of concept. But we do use it on some projects, and it works pretty well so far. Has some issues when using a node access module (like Simple Access), but overall, we're quite happy about it :-).

To solve this issue once and for all, maybe someone could review the module ? It's been in the queue since May 2010, and hardly anybody is testing it. Once it will be an "official" module, we could really speed up its development and improve it with other users feedback.

wadmiraal’s picture

Status: Active » Needs review

I encourage you all to check the i18n_book_navigation module.

As I said in #25, it's still in the CVS queue, so there's no official project page yet. It's still in alpha, so using it on your live site is discouraged. Please download the latest version in #7 !

But, it needs a review. Once it will be accepted, we'll get the feedback we desperately need to improve it. Again, for now, we've used it on several installs and all work. There have been no issues so far.

UPDATE: this has become an official module. Check out the project page

Jose Reyero’s picture

Status: Needs review » Closed (fixed)

Nice, we have a module for that. Thanks.

(For i18n 6.x no new features)

dhills’s picture

I figured out (the steps in #1) this much by trial and error. Where I am stuck is after step 7.

Note that when you are navigating through the pages of your book, the book navigation menu displays in the current language.

My problem is that the menu TITLE doesn't change to the other language.

Anyone have any ideas?

Thanks.

Ludo.R’s picture

Version: 6.x-1.x-dev » 7.x-1.10
Component: Miscellaneous » Synchronization
Category: Feature request » Support request
Issue summary: View changes
Status: Closed (fixed) » Active

Can someone confirm that i18n_sync module doesn't work for Book outlines?

I don't see any related code in i18n_sync for book outlines.

Thanks!