aboutsummaryrefslogtreecommitdiffstats
path: root/en/doc/doc.php
diff options
context:
space:
mode:
Diffstat (limited to 'en/doc/doc.php')
-rw-r--r--en/doc/doc.php63
1 files changed, 63 insertions, 0 deletions
diff --git a/en/doc/doc.php b/en/doc/doc.php
new file mode 100644
index 000000000..31481288d
--- /dev/null
+++ b/en/doc/doc.php
@@ -0,0 +1,63 @@
+<?php
+
+$mga4_installer = array('ca','cs','de','el','en','eo','es','et','fr','id','nl','pl','pt_br','ro','ru','sv','tr','uk');
+$mga4_control_center = array('de','en','et','fr','id','nl','ru','tr','uk');
+
+$mga3_installer = array('de','el','en','es','et','fr','nl','pt_br','ru','uk');
+$mga3_control_center = array('en','et','fr');
+
+$mga2_installer = array('de','el','en','eo','fr','nl','pt_br','uk');
+
+function doc_list($languages, $link, $epub_link = null, $pdf_link = null)
+{
+ global $locale;
+ global $langs;
+ $your_language = '';
+ $others = '';
+ $text_others = '';
+ $your_language_present = FALSE;
+ $other_languages_present = FALSE;
+ foreach ($languages as $lng) {
+ // hopefully temporary exception for pt-br and sv 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 {
+ // hopefully temporary exception for sv which does not exist yet in www.mageia.org
+ if ($lng == 'sv') {
+ $lng_name = 'Swedish';
+ } else {
+ $lng_name = $langs[$lng];
+ }
+ }
+
+ if ($locale == $lng) {
+ $your_language_present = TRUE;
+ if (is_null($epub_link) or is_null($pdf_link)) {
+ $your_language = sprintf($lng_name . ' ~> ' . $link . '<br/><br/>', $lng, $lng_name);
+ } else {
+ $your_language = sprintf($lng_name . ' ~> ' . $link .
+ ' <span style="font-size: 07pt;">( available downloads: ' .
+ $epub_link . ', ' . $pdf_link . ')</span><br/><br/>',
+ $lng, $lng, $lng);
+ }
+ } else {
+ $other_languages_present = TRUE;
+ if (is_null($epub_link) or is_null($pdf_link)) {
+ $others .= sprintf($lng_name . ' ~> ' . $link . '<br/>', $lng, $lng_name);
+ } else {
+ $others .= sprintf($lng_name . ' ~> ' . $link .
+ ' <span style="font-size: 07pt;">( ' . $epub_link .
+ ', ' . $pdf_link . ')</span><br/>', $lng, $lng, $lng);
+ }
+ }
+ }
+ if ($your_language_present) {
+ $text_your_language = _t('<span style="font-weight:bold">Documentation in your language:</span>') . '<br/>';
+ if ($other_languages_present) {
+ $text_others = _t('<span style="font-weight:bold">There are also:</span>') . '<br/>';
+ }
+ } else {
+ $text_your_language = _t('Please help <a href="../community/">us</a> translate it in your language.') . '<br/>';
+ }
+ echo $text_your_language . $your_language . $text_others . $others;
+}