' . PHP_EOL;
// $table .= ' |
';
$table .= "\t
" . PHP_EOL;
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 if ($lng == 'sv') { // hopefully temporary exception for sv which does not exist yet in www.mageia.org
$lng_name = 'Svenska';
} 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(_t('%s available in %s') . '
%s',
'' . $documentation_name . '', $lng_name, sprintf($link, $lng));
} else {
$your_language = sprintf(_t('%s available in %s') . '
%s ('.
_t('also as') . '%s , %s)',
'' . $documentation_name . '',
$lng_name, sprintf($link, $lng), sprintf($epub_link, $lng), sprintf($pdf_link, $lng));
}
} else {
$other_languages_present = TRUE;
if (is_null($epub_link) or is_null($pdf_link)) {
$others[] = sprintf('%s
%s', $lng_name, sprintf($link, $lng));
} else {
$others[] = sprintf('%s
%s (%s , %s)',
$lng_name, sprintf($link, $lng), sprintf($epub_link, $lng), sprintf($pdf_link, $lng), sprintf($link, $lng));
}
}
}
if ($your_language_present) {
$text_your_language = '' . _t('Documentation in your language:') . '
';
if ($other_languages_present) {
$text_others = '' . _t('Other languages:') . '';
}
$table .= sprintf("\t\t%s |
" . PHP_EOL .
"\t\t |
" . PHP_EOL .
"\t\t%s |
" . PHP_EOL,
$your_language, $text_others);
} else {
$text_your_language = _t('Please help us translate it in your language.') . '
';
$table .= sprintf("\t\t%s |
" . PHP_EOL .
"\t\t%s |
" . PHP_EOL .
"\t\t |
" . PHP_EOL,
'' . $documentation_name . '', $text_your_language);
}
foreach ($others as $other_languages) {
$table .= sprintf("\t\t%s |
" . PHP_EOL, $other_languages);
}
$table .= "\t" . PHP_EOL;
$table .= "" . PHP_EOL;
echo $table;
}