WebsiteBaker Community Forum

WebsiteBaker Support (2.8.x) => Templates, Menus & Design => Topic started by: ndh611 on March 27, 2008, 01:14:22 PM

Title: Multi languages, Multi menus at the same time? - SOLVED
Post by: ndh611 on March 27, 2008, 01:14:22 PM
Here is my case:
EN
- a
- b
- c
- d

FR
- a'
- b'
- c'
- d'

I want a,b and a',b' to be on top: menu 1
I want c,d and c',d' to be at the bottom: menu 2

But since EN & FR is menu 1 items, even I set c,d and c',d' to belong to menu 2, they still inherits that from EN & FR so they just don't show.

I use WB 2.6.7, show_menu2.

Oh and btw, if I make c,d and c',d' same level with EN, FR, they show again.

Thanks in advance guys.
Title: Re: Multi languages, Multi menus at the same time?
Post by: ndh611 on March 27, 2008, 04:10:39 PM
Ok so finally I got it. This is the way it should be done:
- Turn on page language in Settings
- Set up the site like this:

a (EN - menu 1)
b (EN - menu 1)
c (EN - menu 2)
d (EN - menu 2)

a' (FR - menu 1)
b' (FR- menu 1)
c' (FR- menu 2)
d' (FR- menu 2)

We cannot make the structure with EN and FR mother-page.
Title: Re: Multi languages, Multi menus at the same time? - SOLVED
Post by: spida on March 27, 2008, 06:49:39 PM
Hi,

could you post a visiual example or a link, please?

Regards,
Ayshe
Title: Re: Multi languages, Multi menus at the same time? - SOLVED
Post by: ndh611 on March 28, 2008, 04:28:23 AM
http://coffeemugvn.com/tictac/ (http://coffeemugvn.com/tictac/)

Please notice that the site is still in production stage :)
Title: Re: Multi languages, Multi menus at the same time? - SOLVED
Post by: Boudi on March 28, 2008, 04:50:35 PM
Holy smoke! Looks great!

So you managed it to create a multilanguage menu in combination with show_menu2 ??
For days I'm struggling to achieve that but I'm totally stucked up.

The problem in my case is to hide the container pages in combination to let the menu (and his child pages) work well with the language selection enabled too in every page.

I tried more than 20 templates but in none of them I create a fully working multilanguage template in combination with show_menu2.

I repeated the steps in http://help.WebsiteBaker.org/pages/en/advanced-docu/designer-guide/multilingual-websites.php (http://help.WebsiteBaker.org/pages/en/advanced-docu/designer-guide/multilingual-websites.php) over and over and over again but no luck!

I think my problem is the final step: insert the code to hide the container and get the show_menu2 do his job properly..

Can you help me out with this? It would be highly appriciated :) Thanks.

Title: Re: Multi languages, Multi menus at the same time? - SOLVED
Post by: ndh611 on March 29, 2008, 03:44:38 AM
Hey man, I understand your situation. At first I struggled with the container page too.
In my case, I did not use EN and FR container - like the tutorial did.

My solution:

All the pages are at the same level, but in Page Settings I set language for them and in General Settings I enable page language.

With such language settings, WB will automatically show menu that belongs to one language not the other one. You do not have to create container pages any more.

And for the switching, show direct link to your homepage in each language.

Site structure:
A (EN - menu 1)
B (EN - menu 2)
C (FR - menu 1)
D (FR - menu 2)

When you go to A, you will only see B, not C or D even they are at the same level because of language setting. You got me?

Hope this helps and excuse my terrible English ;)
Title: Re: Multi languages, Multi menus at the same time? - SOLVED
Post by: Boudi on March 30, 2008, 12:16:03 PM
NDH.....thnQ !

How simple can it be :)

This way you can create with big easy a multi language site on every template. The only disadvantages I noticed were that you have to manually code the choice of switching language in the template and in your admin automatically switches to the language in which you create the pages. Especially last thing is a big pity.  :oops:

Anyway this solution is much easier.

What I did was:

English (container)
- page 1
- page 2
Deutsch (container)
- seite 1
- seite 2
Dutch (container)
- pagina 1
- pagina2

Than I changed the code in the template to:
Code: [Select]
<?php show_menu(1,1,-1);?> to hide the language container.
Title: Re: Multi languages, Multi menus at the same time? - SOLVED
Post by: ndh611 on March 30, 2008, 05:43:41 PM
Yeah u'r right, but there is a small thing:
I want page 1 in menu 1, page 2 in menu 2.

In the structure that we have container, multiple menus will not work.
Just give it a try and you will see why.

Congrats that you found the solution for your website ;)
Title: Re: Multi languages, Multi menus at the same time? - SOLVED
Post by: spida on April 03, 2008, 10:29:59 AM
http://coffeemugvn.com/tictac/ (http://coffeemugvn.com/tictac/)

Please notice that the site is still in production stage :)

Hm, URL is not available anymore...?
Title: Re: Multi languages, Multi menus at the same time? - SOLVED
Post by: ndh611 on April 04, 2008, 04:21:58 PM
http://tictacwatch.com (http://tictacwatch.com) - the old URL was for production stage!!!
Title: Re: Multi languages, Multi menus at the same time? - SOLVED
Post by: joop on April 08, 2008, 11:54:12 PM
This is one GREAT solution!!!
But as usual a question:
I've got a news page on my site, but it stays Dutch in the English site...
Got a English news page, but it does not work.
Has anybody a solution for this one?

For a view http://www.slopsema.nl (http://www.slopsema.nl) and choose English  :roll: then you will see a Dutch news item on the right side of the site.

Greetz,
Joop
Title: Re: Multi languages, Multi menus at the same time? - SOLVED
Post by: kweitzel on April 09, 2008, 12:45:59 AM
The anynews snippet by itself will always get all the posts from the DB. It does not distinguish between the different page_id's. You easiest solution is to use groups for En and NL and then modify the template to insert the group based on the shown language.

But this does not belong here, please post in the correct thread (https://forum.WebsiteBaker.org/index.php/topic,409.0.html) if anything is unclear.

Message to Moderator: Please feel free to move these posts to above mentioned thread. Thanks.

cheers

Klaus