diff options
Diffstat (limited to 'index.php')
-rw-r--r-- | index.php | 18 |
1 files changed, 17 insertions, 1 deletions
@@ -3,10 +3,26 @@ */ require_once 'langs.inc.php'; + +if (isset($_GET['flang'])) +{ + $lang = array_key_exists($_GET['flang'], $langs) ? $_GET['flang'] : 'en'; + if (isset($_GET['furl'])) + { + $url = substr_replace($_GET['furl'], $lang, 1, 2); + } + else + $url = '/' . $lang . '/'; + + header(sprintf('Location: %s', $url)); + die; +} + require_once 'localeDetection.class.php'; $locale = new ChooseLocale(array_keys($langs)); $locale->setDefaultLocale('en'); -header(sprintf('Location: /%s/', $locale->getCompatibleLocale()));
\ No newline at end of file +header(sprintf('Location: /%s/', $locale->getCompatibleLocale())); +die;
\ No newline at end of file |