DE - Start - mein Test -- erster Test -- zweiter Test - meine Ergebnise -- bestes Ergebnnis -- mittleres Ergebnis - Preise und Ehrungen | | EN - Welcome - my Test -- firstTest - my Results -- best Result - Awards |
(Container - German) (Container - English)
DE.php EN.php (page name as you like, recommended: EN, DE, NL ...)
- Startseite - Home
- Seite 1 - site 1
- Seite 2 - no "site 2" exists (create dummy-page; visibility:= "NONE")
<?php
if (function_exists('switchLanguage')) {
switchLanguage(array('EN' => 12, 'DE' => 14));
}
?>
The example assumes that the English container page has the page_id 12, the German one 14.<a href="page.php" target="_self" title="DE">
<img id="flag_icon_de" class="flag_icon" src=".../images/DE.gif" alt="DE" />DE
</a>
Hello,
I'm using language switcher and the by default showing, I mean the flags.
How could I use this module to show the langusges in a drop down menu ?
Regards
(with the flags why not)Hello,
<?php
if (function_exists('switchLanguage')) {
switchLanguage(array('EN' => 1, 'NL' => 2, 'CN' => 46),
'<a href="[url]" target="_self" title="[lang_id]">[img] <!--[lang_id]--></a>');
}?>
I really would like to make use of it so people can see straight away which language is active.Hope someone has a clue.This ist not tested:
if ($root_parent == $lang_id) $url.= '" class="curr_lang';
// create image or text links for the language switcher
This should add the class "curr_lang" to the link of the active language.Hi,Hope someone has a clue.This ist not tested:
Insert code at line 83 of include.php so it looks likeCode: [Select]if ($root_parent == $lang_id) $url.= '" class="curr_lang';
This should add the class "curr_lang" to the link of the active language.
// create image or text links for the language switcher
regards
// build image link if exists
$img = '';
$curr_lang = '';
if (stristr($page_tree[$root_parent][0]['link'],PAGES_DIRECTORY.'/'.$lang_id.'/') !== false) $curr_lang = ' curr_lang';
if (file_exists(dirname(__FILE__) . '/images/' . $lang_id . '.gif')) {
$img = '<img id="flag_icon_' . strtolower($lang_id) . '"' .
' class="flag_icon'.$curr_lang.'" src="' . WB_URL . '/modules/switch_language/images/'
. $lang_id . '.gif" alt="' . $lang_id . '" />';
}
this adds class "curr_lang" to the <img> tag instead of the <a> tag. Thought this makes more sense. This time I made a fast test and it worked for me.$temp[$row['root_parent']]['sub'][] = str_replace($row['root_parent'] . ',', '', $row['page_trail']);
with$temp[$row['root_parent']]['sub'][] = preg_replace('/^' . $row['root_parent'] . ',/', '', $row['page_trail']);
so a page trail like 6,126,140 won't be 12140 but 126,140Hello Stefek and thanks for your response.
Yes, I'd like a combo box (with the flags why not), but don't know what php code to assign and where.
Regards
here is a bugfix which really fckd me up , randomly loosing pages in the tree after moving them around: :evil:
here is a bugfix which really fckd me up , randomly loosing pages in the tree after moving them around: :evil:
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:
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
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
<div id="lang_menu"><?php if(function_exists('language_menu')){ language_menu('png'); } ?>
</div>
<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>
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