toendaCMS Wiki

Multilingual Document Guide

From toendaCMS Wiki

First I created two menu items - one in english and after that the same but translated to dutch. I altered the settings of the menu items to the appropriate language. However when I tryed to create a document for the dutch menu item the "original document" field remains empty. This is in the "mod_content" page. Because of this the dutch page doesn't show in the frontend of the site. The reason for this is that the row "content_uid" in "tcms_content_languages" table remains empty. After I filled in the id number of the original document by hand, the dutch page did show. After lots of echo's and javascript alerts I found that the problem lies in the function "getAllDocuments" in "/engine/tcms_kernel/tcms_file.lib.php" on line 533. Nowhere inside this function or inside the class "tcms_file" the appropriate variables are being set. These variables are "db_choosenDB, db_user, db_pass, db_host, db_database, db_port". Because of this the "getAllDocuments" function returns no documents. I believe this is the reason why the array that should fill the "original document" dropdown box on line 677 in the "/engine/admin/modules/mod_content.php" remains empty, and therefore also the "content_uid" column in the mysql query that should save the new document which is situated on line 1046 of "/engine/admin/modules/mod_content.php".

(with ToendaCMS 2.0)

The default document (document written in the administration language, I suppose english_EN) must be created first, so

  1. create the english sidemenu item, with link to = New Entry
  2. edit the english document, giving it a name, as en_doc_name
  3. create the dutch sidemenu item, with link to = en_doc_name (you will find this name in the select list)
  4. create the dutch version of the document, with the 3-flags icon of the Documents Manager
    select en_doc_name in Original Document select box
    select dutch_NL in Langage select box