diff options
author | Manuel Hiebel <leuhmanu@mageia.org> | 2014-06-08 15:17:54 +0000 |
---|---|---|
committer | Manuel Hiebel <leuhmanu@mageia.org> | 2014-06-08 15:17:54 +0000 |
commit | b3bde618c1c24f3591f4a638b32aed3f7fd2829d (patch) | |
tree | 98bec989075c0f37752bf266b7038a2bb79ead4a /lib.php | |
parent | b8e5c38d5e2bc54c7122dc65b032bc7ae3008449 (diff) | |
download | nav-b3bde618c1c24f3591f4a638b32aed3f7fd2829d.tar nav-b3bde618c1c24f3591f4a638b32aed3f7fd2829d.tar.gz nav-b3bde618c1c24f3591f4a638b32aed3f7fd2829d.tar.bz2 nav-b3bde618c1c24f3591f4a638b32aed3f7fd2829d.tar.xz nav-b3bde618c1c24f3591f4a638b32aed3f7fd2829d.zip |
sync nav
Diffstat (limited to 'lib.php')
-rw-r--r-- | lib.php | 60 |
1 files changed, 42 insertions, 18 deletions
@@ -18,6 +18,41 @@ */ // definition +require_once('php-mo.php'); + +// languages for home +$langs = array( + 'ast' => 'Asturianu', + 'ca' => 'Català', + 'cs' => 'Čeština', + 'de' => 'Deutsch', + 'el' => 'Ελληνικά', + 'en' => 'English', + 'eo' => 'Esperanto', + 'es' => 'Español', + 'et' => 'Eesti', + 'fi' => 'Suomeksi', + 'fr' => 'Français', + 'id' => 'Bahasa Indonesia', + 'it' => 'Italiano', + 'lv' => 'Latviešu', + 'nb' => 'Bokmål', + 'nl' => 'Nederlands', + 'pl' => 'Polski', + 'pt' => 'Português', + 'pt-br' => 'Português do Brasil', + 'ro' => 'Română', + 'ru' => 'Русский', + 'sl' => 'Slovenščina', + 'sq' => 'Gjuha shqipe', + 'sv' => 'Svenska', + 'tr' => 'Türkçe', + 'uk' => 'Українська', + 'ur' => 'اردو', + 'zh-cn' => '简体中文', + 'zh-tw' => '正體中文' +); + class NCache { function __construct() { } @@ -154,7 +189,6 @@ class l10n } if (file_exists($po_file)) { - require_once('langs/php-mo.php'); $dictionary = phpmo_parse_po_file($po_file); foreach ($dictionary as $key => $value) { @@ -282,7 +316,11 @@ function _mgnav_html($wrap = false, $lang = 'en', $inject = null, $vhost = 'www. */ function _mgnav_style() { - return '<style>' . file_get_contents(__DIR__ . '/css/source.css') . '</style>'; + if ( defined('ALIGNMENT') && constant('ALIGNMENT') == 'Center' ){ + return '<style>' . file_get_contents(__DIR__ . '/css/source.css') . '</style><style>' . file_get_contents(__DIR__ . '/css/center.css') . '</style>'; + } else { + return '<style>' . file_get_contents(__DIR__ . '/css/source.css') . '</style>'; + } } /** @@ -294,22 +332,8 @@ function _lang_check($s = null) return 'en'; } - $supported = array( - 'ast', - 'cs', - 'de', - 'el', 'en', 'eo', 'es', 'et', - 'fi', 'fr', - 'id', 'it', - 'lv', - 'nb', 'nl', - 'pl', 'pt', 'pt-br', - 'ro', 'ru', - 'sl', 'sv', - 'tr', - 'uk', 'ur', - 'zh-cn', 'zh-tw' - ); + global $langs; + $supported = array_keys($langs); if (in_array($s, $supported)) return $s; |