aboutsummaryrefslogtreecommitdiffstats
path: root/langs.inc.php
diff options
context:
space:
mode:
Diffstat (limited to 'langs.inc.php')
-rw-r--r--langs.inc.php25
1 files changed, 25 insertions, 0 deletions
diff --git a/langs.inc.php b/langs.inc.php
index f5d7d9654..e64913c30 100644
--- a/langs.inc.php
+++ b/langs.inc.php
@@ -46,4 +46,29 @@ function relocate($langs, $page = '', $default_locale = 'en')
$page
));
die;
+}
+
+/**
+*/
+function show_langs($langs)
+{
+ header('Content-Type: text/html; charset=utf-8');
+ $count = count($langs);
+ $s = <<<S
+<!DOCTYPE html>
+<html lang="en">
+<head>
+ <charset="utf-8">
+ <meta name="robots" content="noindex,nosnippet">
+ <title>Mageia</title>
+</head>
+<body>
+<p><a href="/">Mageia.org</a> is available in {$count} languages:</p>
+<ul>
+S;
+ foreach ($langs as $k => $v) {
+ $s .= sprintf('<li><a href="/%s/" hreflang="%s">%s</a></li>',
+ $k, $k, $v);
+ }
+ echo $s, '</ul><hr /></body></html>';
} \ No newline at end of file