diff options
author | Filip Komar <filip@mageia.org> | 2014-01-05 10:22:23 +0000 |
---|---|---|
committer | Filip Komar <filip@mageia.org> | 2014-01-05 10:22:23 +0000 |
commit | c029a3702b72f23dab8dc9e09954e6fb193889af (patch) | |
tree | 85304498bbbd3dc19d963be1c122a324e41f8282 /en/doc/index.php | |
parent | b87b6e2377792d01bec40e0c6a1b1cf94b39af1d (diff) | |
download | www-c029a3702b72f23dab8dc9e09954e6fb193889af.tar www-c029a3702b72f23dab8dc9e09954e6fb193889af.tar.gz www-c029a3702b72f23dab8dc9e09954e6fb193889af.tar.bz2 www-c029a3702b72f23dab8dc9e09954e6fb193889af.tar.xz www-c029a3702b72f23dab8dc9e09954e6fb193889af.zip |
language names taken from /langs.inc.php
Diffstat (limited to 'en/doc/index.php')
-rw-r--r-- | en/doc/index.php | 40 |
1 files changed, 12 insertions, 28 deletions
diff --git a/en/doc/index.php b/en/doc/index.php index fcc7a5dd3..ca6f09676 100644 --- a/en/doc/index.php +++ b/en/doc/index.php @@ -6,12 +6,20 @@ _lang_load($locale, 'documentation'); function doc_list($languages, $link) { global $locale; + global $langs; $your_language = ''; $others = ''; $text_others = ''; $your_language_present = FALSE; $other_languages_present = FALSE; - foreach ($languages as $lng => $lng_name) { + foreach ($languages as $lng) { + // hopefully temporary exception for pt-br as convention for lang-abbrev in /langs.inc.php is different as link in doc.mageia.org + if ($lng == 'pt_br') { + $lng_name = $langs['pt-br']; + } else { + $lng_name = $langs[$lng]; + } + if ($locale == $lng) { $your_language_present = TRUE; $your_language = sprintf($link . '<br/><br/>', $lng, $lng_name); @@ -54,29 +62,14 @@ function doc_list($languages, $link) <div style="float: left; margin: 2em;"> <h4><?php _e('Installer')?></h4> <p><?php - $mga3_installer = array( - 'de' => 'Deutsch', - 'el' => 'Ελληνικά', - 'en' => 'English', - 'es' => 'Español', - 'et' => 'Eesti', - 'fr' => 'Français', - 'nl' => 'Nederlands', - 'pt_br' => 'Português do Brasil', - 'ru' => 'Pусский', - 'uk' => 'Українська', - ); + $mga3_installer = array('de','el','en','es','et','fr','nl','pt_br','ru','uk'); doc_list($mga3_installer, '<a href="//doc.mageia.org/installer/3/%s/content/index.html">%s</a>'); ?></p> </div> <div style="float: right; margin: 2em;"> <h4><?php _e('Control Center')?></h4> <p><?php - $mga3_control_center = array( - 'en' => 'English', - 'et' => 'Eesti', - 'fr' => 'Français', - ); + $mga3_control_center = array('en','et','fr'); doc_list($mga3_control_center, '<a href="//doc.mageia.org/mcc/3/%s/content/index.html">%s</a>'); ?></p> </div> @@ -85,16 +78,7 @@ function doc_list($languages, $link) <div style="float: left; margin: 2em;"> <h4><?php _e('Installer')?></h4> <p><?php - $mga2_installer = array( - 'de' => 'Deutsch', - 'el' => 'Ελληνικά', - 'en' => 'English', - 'eo' => 'Esperanto', - 'fr' => 'Français', - 'nl' => 'Nederlands', - 'pt_br' => 'Português do Brasil', - 'uk' => 'Українська', - ); + $mga2_installer = array('de','el','en','eo','fr','nl','pt_br','uk'); doc_list($mga2_installer, '<a href="//doc.mageia.org/installer/2/%s/content/index.html">%s</a>'); ?></p> </div> |