WebsiteBaker Community Forum

WebsiteBaker Support (2.8.x) => Templates, Menus & Design => Topic started by: Kolb on January 10, 2010, 04:38:57 PM

Title: Multilingual menu
Post by: Kolb on January 10, 2010, 04:38:57 PM
Hello,

I have created this website http://www.kolb.be/luclammens/wb/pages/nl/home.php in four different languages

Attached you can find my page layout.

I want to change my language from any displayed page, as described in the help, but can't get it to work.
Can someone help me out? I just added 
Quote
    <?php show_menu(1, 0, 1, true, "[a][menu_title][/a]", '', '', '', false, '', 0); ?>
in my index.php but this only shows NL as you can see on the site.

I want it to show NL - FR - EN - DE

What am I doing wrong?

[gelöscht durch Administrator]
Title: Re: Multilingual menu
Post by: crnogorac081 on January 10, 2010, 04:56:24 PM
Hi,

Try this:

Code: [Select]
<?php show_menu(111true"[a][menu_title][/a]", &#39;&#39;, &#39;&#39;, &#39;&#39;, false, &#39;&#39;, 0); ?>

More about show_menu you can find in WB help pages. The seccond parameter is changed from 0 - 1 It shows starting point of your menu level. Third parameter shows number of levels you want to display - in your case 1 will work, as you do not have submenu in your screenshoot :) If you do add submenus, you must change it to 2 or 0(infinite) to show submenus in this menu box..

cheers
Title: Re: Multilingual menu
Post by: Kolb on January 10, 2010, 05:04:35 PM
Thanks for your fast reply,

I all ready did this in index.php and this only shows my 4 pages under NL. For an example you can visit the site. Any idea why?
Title: Re: Multilingual menu
Post by: crnogorac081 on January 10, 2010, 05:36:58 PM
Hi,

Now I see it displays all your NL pages, like in menu below.. Did you ment to show only image flags to change language ??
Title: Re: Multilingual menu
Post by: Kolb on January 10, 2010, 06:21:41 PM
That is correct, flags are not necessary, I would prefer just text links.
Title: Re: Multilingual menu
Post by: Waldschwein on January 10, 2010, 06:40:03 PM
Hello!

The "best" thing is the following:

1.) Upgrade your site to the latest SVN version from WB. (http://project.websitebaker2.org/browser/branches/2.8.x bottom "Download as zip archive" -> access the "upgrade-script.php", follow the instructions, then delete it).
2.) Download from http://WebsiteBaker-next.de/wb/pages/de/downloads/tools-downloads.php the "Multilingual Tool Version 1.1 alpha" and install it
3.) Make sure your site-languages are turned on and are setted correctly.
4.) In your template (where you want to place the multilingual codes) place
Code: [Select]
<div class="langmenu">
   <?php  if(function_exists(&#39;language_menu&#39;)) { language_menu(); }  ?>
</div>
5.) Access your page-settings (there is a new field) and set all pages to a page-code from the dropdown-list. So EN/NL/DE/FR translations to your "primary site". That means, you set here for EN/NL/DE/FR sites all the page-code list to the NL site (if it's your primar language).
6.) You should have in the frontend on every single site the language flags (they can be changed only in the Core files of the mod_multilingual yet) and there is a redirection to the regarding "translation" when clicking on the flag.

Please note: It's only possible with the SVN version, not with WB 2.8.0! There is a similar mod for this, but you need to change some Corefiles of WB for this...

Yours Michael
Title: Re: Multilingual menu
Post by: Kolb on January 10, 2010, 07:03:00 PM
Thanks for your reply, appreciate it!

But what is the SVN version? What am I doing wrong, I just followed the instructions posted in the knowledge base.
It shouldn't be so hard to include, so I am guessing I am doing something wrong.
Title: Re: Multilingual menu
Post by: Waldschwein on January 10, 2010, 07:37:19 PM
Hello!

Hmm, directly accessing the SVN is possible only with a SVN program installed on your PC (for Windows TortoiseSVN / http://svn.websitebaker2.org/branches/2.8.x/wb). But that is not necessary: You can download the version from http://project.websitebaker2.org/browser/branches/2.8.x -> Download in other formats: Zip Archive

Yours Michael

Title: Re: Multilingual menu
Post by: Luisehahne on January 10, 2010, 07:42:30 PM
All you need ist here, but in moment it's only in german. You find the last SVN from today and the multilinigual V1.2 alpha

http://WebsiteBaker-next.de/wb/pages/de/startseite/aenderungen-wb-2.8.1.php (http://WebsiteBaker-next.de/wb/pages/de/startseite/aenderungen-wb-2.8.1.php)

Dietmar

Title: Re: Multilingual menu
Post by: crnogorac081 on January 10, 2010, 07:56:14 PM
Lets simplify it :)

Try this code [updated post]:
Code: [Select]
<?php show_menu2(0SM2_ROOTSM2_STARTSM2_ALL, &#39; | [a][menu_title]</a>&#39;, &#39;&#39;, &#39;&#39;, &#39;&#39;, &#39;[a][menu_title]</a>&#39;);  ?>


Title: Re: Multilingual menu
Post by: Kolb on January 10, 2010, 08:31:47 PM
crnogorac081, not working! It only shows the current language, not the other 4 languages!

I am clueless!