aboutsummaryrefslogtreecommitdiffstats
path: root/en/doc/index.php
blob: 0cc61853ac5e062734fb6243af3c3376e35146a6 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
<?php
define('HLANG', true);
require '../../langs.php';
_lang_load($locale, 'documentation');

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($link . '<br/><br/>', $lng, $lng_name);
            } else {
                $your_language = sprintf($link . ' <span style="font-size: 07pt;">( ' . $epub_link . ', ' . $pdf_link . ')</span><br/><br/>', $lng, $lng_name, $lng, $lng);
            }
        } else {
            $other_languages_present = TRUE;
            if (is_null($epub_link) or is_null($pdf_link)) {
                $others .= sprintf($link . '<br/>', $lng, $lng_name);
            } else {
                $others .= sprintf($link . ' <span style="font-size: 07pt;">( ' . $epub_link . ', ' . $pdf_link . ')</span><br/>', $lng, $lng_name, $lng, $lng);
            }
        }
    }
    if ($your_language_present) {
        $text_your_language = _t('Documentation in your language:') . '<br/>';
        if ($other_languages_present) {
            $text_others = _t('There are also:') . '<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;
}

?><!DOCTYPE html>
<html lang="<?php echo $locale; ?>" dir="ltr">
<head>
    <meta charset="utf-8">
    <title><?php _e('Mageia Documentation')?></title>
    <meta name="description" content="<?php _e('Documentation for Mageia distribution and its tools.')?>">
    <meta name="keywords" content="<?php _e('doc,documentation,help,guide,installer,installation,mageia,linux')?>">
    <link rel="stylesheet" href="/g/style/all.css" type="text/css">
</head>
<body class="doc">
    <?php echo $hsnav; ?>
    <h1 id="mgnavt"><?php _e('Mageia Documentation')?></h1>
    <div id="doc" class="yui-t7">
        <div id="bd" role="main">
            <div class="yui-g">
                <div class="para donate" style="padding-top: 2em;">
                    <h2><?php _e('Find your documentation')?></h2>
                    <p><?php _e('Select the manual, the release of Mageia and the language you want to see.')?><br/>
                    <?php _e('(If no documentation is availlable in your language, try with the old versions <a href="archive.php">here</a>)')?></p>
                    <hr>
                    <h3>Mageia 4</h3>
                    <div style="float: left; margin: 2em;">
                        <h4><?php _e('Installer')?></h4>
                        <p><?php
                            $mga4_installer = array('ca','cs','de','el','en','eo','es','et','fr','id','nl','pl','pt_br','ro','ru','sv','tr','uk');
                            doc_list($mga4_installer, '<a href="//doc.mageia.org/installer/4/%s/content/index.html">%s</a>',
                                '<a href="//doc.mageia.org/installer/4/%s/content/index.html">EPUB</a>',
                                '<a href="//doc.mageia.org/installer/4/%s/content/index.html">PDF</a>');
                            ?></p>
                    </div>
                    <div style="float: right; margin: 2em;">
                        <h4><?php _e('Control Center')?></h4>
                        <p><?php
                            $mga4_control_center = array('de','en','et','fr','id','nl','ru','tr','uk');
                            doc_list($mga4_control_center, '<a href="//doc.mageia.org/mcc/4/%s/content/index.html">%s</a>',
                                '<a href="//doc.mageia.org/mcc/4/%s/content/index.html">EPUB</a>',
                                '<a href="//doc.mageia.org/mcc/4/%s/content/index.html">PDF</a>');
                            ?></p>
                    </div>
                    <hr style="clear: both;">
                    <h3>Mageia 3</h3>
                    <div style="float: left; margin: 2em;">
                        <h4><?php _e('Installer')?></h4>
                        <p><?php
                            $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','et','fr');
                            doc_list($mga3_control_center, '<a href="//doc.mageia.org/mcc/3/%s/content/index.html">%s</a>');
                            ?></p>
                    </div>
                </div>
            </div>
        </div>
    </div>
    <div style="margin-left: 2em;">
        <hr>
        <p><a href="//www.mageia.org/<?php echo $locale; ?>/map/"><?php _e('Mageia sitemap')?></a>
            | <a href="//www.mageia.org/<?php echo $locale; ?>/support/"><?php _e('Support')?></a></p>
    </div>
</body>
</html>