Author Topic: mod_multilingual help!!!  (Read 222 times)

Offline joyhill

  • Posts: 5
mod_multilingual help!!!
« on: February 06, 2017, 09:19:23 AM »
Hello!

I am trying to make multilingual page with mod_multilingual, but in my opinion the instructions are very weak. I have tried and tried and tried with readme.txt and http://help.WebsiteBaker.org/en/help/designerguide/multilingualwebsites.php but it doesn't work as it should.

All I got is this: http://mikalinkki.net/testaus/pages/fi/etusivu.php . If I try to put following lines to template index.php it says that "page doesn't work".
Code: [Select]
<?php if(function_exists('language_menu')) { language_menu('gif|png'); } ?>
    <?php $iMultiLang 0; if (function_exists('language_menu')) { language_menu('gif|png'); $iMultiLang 1;} ?>

Is there any opportunities to get step-by-step instrucions for dummies here?

Thanks!

P.S. from Moderator: Pls use Code-button # for code in your post - thanks
« Last Edit: February 06, 2017, 11:55:55 AM by jacobi22 »

Offline Luisehahne

  • WebsiteBaker Org e.V.
  • Posts: 4021
    • Webdesign und Entwicklung WebsiteBaker
Re: mod_multilingual help!!!
« Reply #1 on: February 06, 2017, 09:28:37 AM »
i registered it, let me a little bit time to create, because my english is not the best.

Dietmar
Eric T. Hansen, amerikanischer Buchautor „Nörgeln des Deutschen größte Lust"
Neues Unwort: Schnappatmung

Offline joyhill

  • Posts: 5
Re: mod_multilingual help!!!
« Reply #2 on: February 06, 2017, 09:39:31 AM »
Oh well.. I got it. I found one discussion here which help me a little bit. I changed the menu-link language and it started to work! :D

BUT I am wondering if I use other template which doesn't have multilingual already as that "new" default template, I will need those step-by-step -instructions still. My customer want change their website to multilingual and there is other template, so I think that there will be problems to get it work.

Offline jacobi22

  • Posts: 4032
    • Jacobi22
Re: mod_multilingual help!!!
« Reply #3 on: February 06, 2017, 10:27:25 AM »
add for every used language in your project a startpage with type menu-link. name this added page in the official language code like DE, EN, ES, RU etc (what ever you need).
go then to the page settings from every added menu-link page and set the language from this page to the page name, DE has language = german (DE), EN has language english (EN) etc
no go to your existed pages into the page settings from every page in the main level and set the parent page to this language, what you need

Example: i 've a single language project in english and will change it to a multi-lingual project with english and german
i add a page with type Menu-Link and language EN
normalize all my existed pages in the single language project has the parent == none, here i have to change the parent now to EN (my page with the name = EN)

for all other languages.... be sure, that the start page from every language tree has the correct language in page settings before you add more sub pages in this language tree. Same prpblem, if you use the tool page_cloner - check the language from every copied file
Du warst hier in meiner Seele und bist jetzt meilenweit entfernt
Wenn ich in Liedern von dir erzähle, war das jede Träne wert!
Alex Diehl- In meiner Seele

Offline joyhill

  • Posts: 5
Re: mod_multilingual help!!!
« Reply #4 on: February 06, 2017, 11:35:13 AM »
This works fine on my test pages, but how can I get those "FI", "EN" etc. menu links lost? I have tried several show_menu2 options, but didn't manage to hide them.

And I still want that step-by-step instruction for templates which don't have multilingual already. :)

Offline jacobi22

  • Posts: 4032
    • Jacobi22
Re: mod_multilingual help!!!
« Reply #5 on: February 06, 2017, 11:53:19 AM »
take a look into the DefaultTemplate  ;-)
two example, important is the red marked part - you have to change the start level for the menu

Version 1: need the definition of $iMultiLang in the call of the multilang-menu (your code in the top)

Quote
echo show_menu2(0,SM2_ROOT+(int)$iMultiLang,SM2_CURR+1,SM2_TRIM|SM2_BUFFER|SM2_PRETTY|SM2_NUMCLASS,'<li><span class="menu-default">[ac][menu_title]</a></span>','</li>','<ul>','</ul>');


Version 2: fix start level - ROOT is level 0 with FI, EN etc, ROOT + 1 are the files in the language tree's (sub-pages under FI etc)
Quote
echo show_menu2(0,SM2_ROOT+1,SM2_CURR+1,SM2_TRIM|SM2_BUFFER|SM2_PRETTY|SM2_NUMCLASS,'<li><span class="menu-default">[ac][menu_title]</a></span>','</li>','<ul>','</ul>');
Du warst hier in meiner Seele und bist jetzt meilenweit entfernt
Wenn ich in Liedern von dir erzähle, war das jede Träne wert!
Alex Diehl- In meiner Seele

Offline joyhill

  • Posts: 5
Re: mod_multilingual help!!!
« Reply #6 on: February 07, 2017, 08:03:25 AM »
Hello (world) again! :D

I try to make multilingual page with findresp-template, but if I add codelines which are dipslayed higher, the page gives me this error message:

Fatal error: Class 'Translate' not found in /home/vuotonjo/public_html/wb/modules/mod_multilingual/include.php on line 56


So can I even use this mod_multilingual with any template?

Offline Luisehahne

  • WebsiteBaker Org e.V.
  • Posts: 4021
    • Webdesign und Entwicklung WebsiteBaker
Re: mod_multilingual help!!!
« Reply #7 on: February 07, 2017, 10:08:40 AM »
i take a look in the code, mom

Dietmar
Eric T. Hansen, amerikanischer Buchautor „Nörgeln des Deutschen größte Lust"
Neues Unwort: Schnappatmung

Offline Luisehahne

  • WebsiteBaker Org e.V.
  • Posts: 4021
    • Webdesign und Entwicklung WebsiteBaker
Re: mod_multilingual help!!!
« Reply #8 on: February 07, 2017, 10:35:51 AM »
Please try the attached new include.php

Dietmar
Eric T. Hansen, amerikanischer Buchautor „Nörgeln des Deutschen größte Lust"
Neues Unwort: Schnappatmung

Offline joyhill

  • Posts: 5
Re: mod_multilingual help!!!
« Reply #9 on: February 07, 2017, 10:54:29 AM »
It works! I had to update wb to the latest version. And BLING!  (Y)