diff options
-rw-r--r-- | lib.php | 11 |
1 files changed, 6 insertions, 5 deletions
@@ -110,10 +110,8 @@ function _mgnav_style() */ function _lang_check($s = null) { - if (!is_null($s)) { - $sub = explode('-', $s); - $sub = strtolower($sub[0]); - } + if (is_null($s)) + return 'en'; $supported = array( 'cs', @@ -134,8 +132,11 @@ function _lang_check($s = null) if (in_array($s, $supported)) return $s; + $sub = explode('-', $s); + $sub = strtolower($sub[0]); + if (in_array($sub, $supported)) - return $s; + return $sub; return 'en'; } |