aboutsummaryrefslogtreecommitdiffstats
path: root/langs.php
diff options
context:
space:
mode:
authorRomain d'Alverny <rda@mageia.org>2010-12-06 09:01:19 +0000
committerRomain d'Alverny <rda@mageia.org>2010-12-06 09:01:19 +0000
commit8a851df7c1ed5c982368e0bc6e3c564b1cc40b84 (patch)
tree3d73661e7bbebf5a9000a4ef2f4708feca474b44 /langs.php
parent349b9d6adaefff65a03eeafde1ee524dd0dd1f99 (diff)
downloadwww-8a851df7c1ed5c982368e0bc6e3c564b1cc40b84.tar
www-8a851df7c1ed5c982368e0bc6e3c564b1cc40b84.tar.gz
www-8a851df7c1ed5c982368e0bc6e3c564b1cc40b84.tar.bz2
www-8a851df7c1ed5c982368e0bc6e3c564b1cc40b84.tar.xz
www-8a851df7c1ed5c982368e0bc6e3c564b1cc40b84.zip
localize top menu
Diffstat (limited to 'langs.php')
-rw-r--r--langs.php41
1 files changed, 34 insertions, 7 deletions
diff --git a/langs.php b/langs.php
index 5c40b25bc..117ade276 100644
--- a/langs.php
+++ b/langs.php
@@ -32,22 +32,49 @@ foreach ($langs as $k => $v)
// global nav
$nav_list = array(
"/{$locale}/" => 'Mageia',
- "http://blog.mageia.org/{$locale}" => 'Blog',
+ "http://blog.mageia.org/{$locale}" => array(
+ 'en' => 'Blog',
+ 'tr' => 'Web Günlüğü'
+ ),
'/wiki' => 'Wiki',
- "/{$locale}/faq/" => 'FAQ',
- "http://donate.mageia.org/{$locale}/" => 'Donations',
- "http://mageia.org/wiki/doku.php?id=press" => 'Press',
- "/{$locale}/about/values/" => 'Values',
- "/{$locale}/about/code-of-conduct/" => 'Code of Conduct'
+ "/{$locale}/faq/" => array(
+ 'en' => 'FAQ',
+ 'tr' => 'S.S.S.'
+ ),
+ "http://donate.mageia.org/{$locale}/" => array(
+ 'en' => 'Donations',
+ 'fr' => 'Dons',
+ 'tr' => 'Bağışlar'
+ ),
+ "http://mageia.org/wiki/doku.php?id=press" => array(
+ 'en' => 'Press',
+ 'fr' => 'Presse',
+ 'tr' => 'Basın'
+ ),
+ "/{$locale}/about/values/" => array(
+ 'en' => 'Values',
+ 'fr' => 'Valeurs',
+ 'tr' => 'Değerler'
+ ),
+ "/{$locale}/about/code-of-conduct/" => array(
+ 'en' => 'Code of Conduct',
+ 'fr' => 'Code de conduite',
+ 'tr' => 'Temel İlkeler'
+ )
);
$list_menu = array();
foreach ($nav_list as $k => $v)
{
+ if (is_array($v))
+ $title = array_key_exists($locale, $v) ? $v[$locale] : $v['en'];
+ else
+ $title = $v;
+
$list_menu[] = sprintf('<a href="%s"%s>%s</a>',
$k,
$k == $sru ? ' class="sel"' : '',
- $v);
+ $title);
}
echo sprintf('<div class="nav"><!--googleoff: all--><div class="nav2"><p class="loc">%s</p>', implode(' | ', $list_menu));