Hi Klaus,
thanks for the code!
Unfortunately it does not work yet. I put it that way:
<body>
<div id="container">
<div id="kopf"><h2><?php page_title('','[PAGE_TITLE]'); ?></h2></div>
<div id="left">
<div id="navi_1"><?php show_menu(1, 1); ?></div>
<div id="sprache">
<?php
$page_id = PAGE_ID;
$query_page = $database->query("SELECT root_parent, parent FROM ".TABLE_PREFIX."pages WHERE page_id = $page_id LIMIT 1");
$fetch_page = $query_page->fetchRow();
$root_parent = $fetch_page['root_parent'];
$parent = $fetch_page['parent'];
if ($root_parent == 0){
$current_parent = $parent; }
else {
$current_parent = $root_parent; }
if ($dir = @opendir(WB_PATH.MEDIA_DIRECTORY.'/flags')) {
while (false !== ($file = readdir($dir))) {
if (substr($file, 0, 1) != '.' AND $file != 'index.php') {
$filelist[] = $file;
}
}
closedir($dir);
}
asort($filelist);
foreach ($filelist as $filename) {
$pathinfo = pathinfo($filename);
$language = strtolower(str_replace('.'.$pathinfo['extension'],'',$filename));
$query_page = $database->query("SELECT root_parent, parent FROM ".TABLE_PREFIX."pages WHERE page_title = '$language' LIMIT 1");
$fetch_page = $query_page->fetchRow();
$current_root_parent = $fetch_page['root_parent'];
$current_parent = $fetch_page['parent'];
if (($current_root_parent == '0') or ($current_root_parent == '')){
$check_parent = $current_parent;}
if ($root_parent != $check_parent) {
$css = '';
} else {
$css = 'display: none;';
}
echo '<p style="'.$css.'">';
echo '<a href="'.WB_URL.PAGES_DIRECTORY.'/'.$language.PAGE_EXTENSION.'">';
echo '<img src="'.WB_URL.MEDIA_DIRECTORY.'/flags/'.$filename.' " alt="'.$language.'" />';
echo '</a></p>';
}
?>
</div>
<div id="sprache"><?php show_menu(1, 0, 1, true, "[a]<img src=" .WB_URL . "/media/flags/[menu_title].gif />[/a]", '', '', '', false, '', 0); ?></div>
</div>
<div id="inhalt"><?php page_content(); ?></div>
<div id="footer"></div>
</div>
</body>
(I left the old languages switch underneath for comparison)
Both flags are being displayed.

Could the reason be that my root pages are not named en.php and de.php but home.php and startseite.php?
Regards
Jochen