Author Topic: Snippet: Language Switcher  (Read 28700 times)

Offline Gast

  • Posts: 5920
Re: Snippet: Language Switcher
« Reply #25 on: July 17, 2014, 06:03:21 PM »
i use the multi_linguale module from here
http://www.WebsiteBaker.org/forum/index.php/topic,27345.msg188623.html#msg188623

works without problems
Step 1:  build your page tree in the main language
Step 2: build a page tree or a part of the page tree from the sub languages
Step 3: select your "target" page (from the main language)  in the select field "page code"

works without problems for me with a flaggs menu

Offline cwsoft

  • Posts: 605
Re: Snippet: Language Switcher
« Reply #26 on: July 17, 2014, 06:36:14 PM »
Hi,

But as with so many things about WB, the author has left the building, and nobody seems to give a @#$#@ anymore.
Well the author is still around, but indeed doesn't give a @#$#@ anymore, as a WB core replacement and a similar module exists, which makes this snippet obsolete. No big user base, no further development :wink:

Cheers cwsoft
« Last Edit: July 17, 2014, 09:47:19 PM by cwsoft »

Offline CodeALot

  • Posts: 451
  • Gender: Male
Re: Snippet: Language Switcher
« Reply #27 on: July 18, 2014, 10:19:14 AM »
i use the multi_linguale module from here
http://www.WebsiteBaker.org/forum/index.php/topic,27345.msg188623.html#msg188623

works without problems
Step 1:  build your page tree in the main language
Step 2: build a page tree or a part of the page tree from the sub languages
Step 3: select your "target" page (from the main language)  in the select field "page code"

works without problems for me with a flaggs menu

Thanks for the pointer, but I can't find anywhere how to use it...  :-D

I installed it, in the page settings screen I now see a new option to set a Page code, should that point to the same page but in the other language?
Does that mean I can 'only' use two languages?

Your help is much appreciated!

Offline Gast

  • Posts: 5920
Re: Snippet: Language Switcher
« Reply #28 on: July 18, 2014, 12:29:25 PM »
Quote
Does that mean I can 'only' use two languages?
there are no limits, i use it with 8 different languages in one project, no problems

for example

english is your main language, you have a page tree like your post (1, 1A, 2, 2A, 3, 3A, 4, 4A) in all languages. sub languages are german, french etc
open your german page 3A, go there to the pages setting and select your english target page (main language page 3A). do the same for the other sub languages and for every page in your page tree

use this code in your template index.php for the flag menu
Quote
<div id="lang_menu"><?php if(function_exists('language_menu')){ language_menu('png'); } ?>
</div>

this code build a menu like this
Code: [Select]
<div id="langmenu">
        <a href ="page_link" title="lang_name" >
        <span><img class="default" src="page_lang.gif" alt="lang_name" title="lang_name" />
        </span></a>
        <a href ="page_link" title="" >
        <span><img class="default" src="page_lang.gif" alt="lang_name" title="lang_name" />
        </span></a>
        <a href ="page_link" title="" >
        <span><img class="current" src="current_lang.gif" alt="lang_name" title="lang_name" />
</span></a>
</div>

it builds a menu with flags for every language. a language tree must have (minimum) 1 page to show the flag in your flag menu. if you not select a target page, the flag link goes to the start page from this language


Offline CodeALot

  • Posts: 451
  • Gender: Male
Re: Snippet: Language Switcher
« Reply #29 on: July 18, 2014, 01:44:46 PM »

english is your main language, you have a page tree like your post (1, 1A, 2, 2A, 3, 3A, 4, 4A) in all languages. sub languages are german, french etc
open your german page 3A, go there to the pages setting and select your english target page (main language page 3A). do the same for the other sub languages and for every page in your page tree

Thanks, I'm on it. :) 216 pages to do.... Bweeh! LOL But at least it's possible. Now let's hope WB will behave... It is known to have some problems handling large amounts of pages....

Thanks again!

 

postern-length