SVN commit 1236154 by messmer: added language selector for derry skin added i18n support of PlasmaMenu class fixed cookie reading for locale M +3 -3 classes/class_menu.inc M +11 -1 derry/css.php M +20 -10 derry/toolbox.inc M +1 -0 functions.inc M +4 -4 header.inc --- trunk/www/media/includes/classes/class_menu.inc #1236153:1236154 @@ -800,7 +800,7 @@ { $nav .= $sep . $this->buildLink($name, $link); $nav .= $sep . $this->buildLink($entryName, $entryLink); - $nav .= $sep . $subEntryName; + $nav .= $sep . i18n_var( $subEntryName ); $set = true; } } @@ -809,7 +809,7 @@ if ($url && $entryLink && strpos($url, $entryLink) !== false && !$set) { $nav .= $sep . $this->buildLink($name, $link); - $nav .= $sep . $entryName; + $nav .= $sep . i18n_var( $entryName ); $set = true; } } @@ -829,7 +829,7 @@ function buildLink($name, $url) { // Return the link - return ($url ? "{$name}" : $name); + return ($url ? "".i18n_var($name)."" : i18n_var( $name ) ); } } --- trunk/www/media/includes/derry/css.php #1236153:1236154 @@ -250,7 +250,7 @@ #main .toolbox ul{ list-style: none; - text-align: right; + text-align: left; font-size: 1em; padding: 11px 5px 11px; background: url('../../images/border-breadcrumb.png') no-repeat center center; @@ -268,6 +268,16 @@ list-style-image: none; } +/* skinny language selector in the toolbox line */ +#main .toolbox #location form { + float:right; + border:none; + border-radius:none; + box-shadow:none; + padding:8px 5px; + margin:0; +} + /*H1 is defined at HEADER styles */ /*#main h1 { color: #446888;font-size:22pt; padding:30px 0px 20px 0px;}*/ #main h1, #main h2, #main h3, #main h4, #main h5, #main h6 {font-weight:normal} --- trunk/www/media/includes/derry/toolbox.inc #1236153:1236154 @@ -1,15 +1,25 @@ - + 1) + { ?> -
+
+ + " id="languageButton" /> +
+ +
- --- trunk/www/media/includes/functions.inc #1236153:1236154 @@ -262,6 +262,7 @@ { switch ($code) { + case "de": return "Deutsch"; case "el": return "Ελληνικά"; case "en": return "English"; case "es": return "Español"; --- trunk/www/media/includes/header.inc #1236153:1236154 @@ -26,9 +26,9 @@ } else { - if (isset($_REQUEST['locale'])) + if (isset($_COOKIE['locale'])) { - $site_locale = $_REQUEST['locale']; + $site_locale = $_COOKIE['locale']; } else { @@ -94,7 +94,7 @@ $site_title = i18n_var("K Desktop Environment"); if (isset($page_title)) - $title = "$site_title - $page_title"; + $title = "$site_title - ".i18n_var( $page_title ); else $title = $site_title; @@ -154,7 +154,7 @@ if (isset($page_title_extra_html)) { print $page_title_extra_html; } - print "

$page_title

\n"; + print "

".i18n_var( $page_title )."

\n"; } if (isset ($templatepath))