diff options
author | Thomas Backlund <tmb@mageia.org> | 2014-10-12 12:27:45 +0300 |
---|---|---|
committer | Thomas Backlund <tmb@mageia.org> | 2014-10-12 12:27:45 +0300 |
commit | 9ce6d646ff718cd62f6434c9a4c94e450436612a (patch) | |
tree | 3ee82e5db7c0aee44a5573d9d17035c6ecac697d /langs.php | |
parent | a0b2d09125d7911656fe4cb286f20643c4432281 (diff) | |
download | www-9ce6d646ff718cd62f6434c9a4c94e450436612a.tar www-9ce6d646ff718cd62f6434c9a4c94e450436612a.tar.gz www-9ce6d646ff718cd62f6434c9a4c94e450436612a.tar.bz2 www-9ce6d646ff718cd62f6434c9a4c94e450436612a.tar.xz www-9ce6d646ff718cd62f6434c9a4c94e450436612a.zip |
Revert "Updated Estonian translation"
This reverts commit a0b2d09125d7911656fe4cb286f20643c4432281.
Diffstat (limited to 'langs.php')
-rw-r--r-- | langs.php | 84 |
1 files changed, 84 insertions, 0 deletions
diff --git a/langs.php b/langs.php new file mode 100644 index 000000000..3aadfabba --- /dev/null +++ b/langs.php @@ -0,0 +1,84 @@ +<?php +/** +*/ + +if (isset($_SERVER['APP_MODE']) && $_SERVER['APP_MODE'] !== 'prod') { + ini_set('error_reporting', E_ALL); + ini_set('show_errors', true); + ini_set('display_errors', true); +} else { + ini_set('error_reporting', FALSE); + ini_set('show_errors', FALSE); + ini_set('display_errors', FALSE); + ini_set('log_errors', FALSE); +} + +if ($_SERVER['HTTP_HOST'] == 'www-test.mageia.org') { + ini_set('error_reporting', E_ALL&~E_DEPRECATED); + ini_set('show_errors', true); + ini_set('display_errors', true); + ini_set('log_errors', true); +} + +//$g_app_root = realpath(dirname(__FILE__)); +//define('G_APP_ROOT', $g_app_root); + +$g_donate_amount = '--'; +$g_amount_remain = 'EUR 10,244.46'; + +$G_coord_assos = <<<T + Assocation Mageia.Org + 6 rue du chateau d'eau + 78650 BEYNES + FRANCE +T; +$G_coord_assos_bank = <<<T + CIC BEYNES + 18 RUE DE LA REPUBLIQUE + 78650 BEYNES + FRANCE + + IBAN : FR76 3006 6103 1600 0202 1370 139 + BIC: CMCIFRPP +T; + +require_once 'langs.inc.php'; + +$sru = trim($_SERVER['REQUEST_URI']); +$sel = explode('/', $sru); +array_shift($sel); +if (!isset($locale)) + $locale = array_shift($sel); + +$page = count($sel) > 0 ? implode('/', $sel) : null; +$list_langs = array(); +$options = array(); + +foreach ($langs as $k => $v) { + $list_langs[] = sprintf('<a href="/%s"%s>%s</a>', + $page != null ? implode('/', array($k, $page)) : $k, + $k == $locale ? ' class="sel"' : '', + $v); + + $options[] = sprintf('<option value="%s"%s>%s</option>', + $k, + $k == $locale ? ' selected="selected"' : '', + $v); +} + +$options = implode($options); +$langsForm = <<<H +<form id="lang_form" dir="ltr" method="get" action="/"> + <input type="hidden" name="furl" value="{$_SERVER['REQUEST_URI']}" /> + <select id="flang" name="flang" dir="ltr" onchange="this.form.submit()"> + {$options} + </select> + <noscript><div><input type="submit" id="lang_submit" value="Hop!" /></div></noscript> +</form> +H; + +$hsnav = _mgnav_style() . _mgnav_html(true, $locale, $langsForm, $_SERVER['HTTP_HOST']); +$hsfoot = ''; + +if (!defined('HLANG')) + echo $hsnav; |