mirror of
https://github.com/Mibew/i18n.git
synced 2025-01-24 14:10:28 +03:00
19 lines
482 B
PHP
19 lines
482 B
PHP
|
<?php
|
||
|
function menuloc($id) {
|
||
|
global $current_locale;
|
||
|
if($current_locale == $id) {
|
||
|
return " class=\"active\"";
|
||
|
}
|
||
|
return "";
|
||
|
}
|
||
|
|
||
|
$page['right_menu'] = "";
|
||
|
|
||
|
if(isset($page) && isset($page['localeLinks'])) {
|
||
|
$page['right_menu'] .= "<li>\n<h2><b>locales</b></h2>\n<ul class=\"locales\">\n";
|
||
|
foreach($page['localeLinks'] as $id => $title) {
|
||
|
$page['right_menu'] .= "<li".menuloc($id)."><a href=\"?locale=$id\">$title</a></li>\n";
|
||
|
}
|
||
|
$page['right_menu'] .= "</ul>\n</li>";
|
||
|
}
|
||
|
?>
|