|
|
@@ -72,12 +72,16 @@ if(is_array($f3->get('reroutes'))) { |
|
|
|
|
|
|
|
// set language |
|
|
|
$languages = $f3->get('languages'); |
|
|
|
if ( ! is_array($languages) ) { |
|
|
|
$languages = [$languages]; |
|
|
|
} |
|
|
|
$f3->set('default_lang', array_shift($languages)); |
|
|
|
if (in_array(strtolower($f3->get('GET.lang')), $languages)) { |
|
|
|
$f3->set('LANG', strtolower($f3->get('GET.lang'))); |
|
|
|
$f3->set('LANG', strtolower($f3->get('GET.lang'))); |
|
|
|
} else { |
|
|
|
$f3->set('LANG', $f3->get('default_lang')); |
|
|
|
$f3->set('LANG', $f3->get('default_lang')); |
|
|
|
} |
|
|
|
|
|
|
|
// set content dir |
|
|
|
if(array_key_exists($f3->get('LANG'), $f3->get('content'))) { |
|
|
|
$content_dir=$f3->get('content.'.$f3->get('LANG')); |