Changeset 134 in svn


Ignore:
Timestamp:
2006-09-04T14:05:19+02:00 (9 years ago)
Author:
Xuefer
Message:

fix 2nd lang file detecting

Location:
trunk
Files:
2 edited

Legend:

Unmodified
Added
Removed
  • trunk/admin/common.php

    r125 r134  
    2626    $s = strtolower($charset);
    2727    if (isset($lang)) {
    28         $file = get_language_file_ex($name, strtolower($lang), $s);
     28        $l = strtolower($lang);
     29        $file = get_language_file_ex($name, $l, $s);
     30        if (!isset($file)) {
     31            $l = strtok($l, '-');
     32            $file = get_language_file_ex($name, $l, $s);
     33        }
    2934    }
    3035    else if (!empty($_SERVER['HTTP_ACCEPT_LANGUAGE'])) {
  • trunk/coverager/common.php

    r124 r134  
    2626    $s = strtolower($charset);
    2727    if (isset($lang)) {
    28         $file = get_language_file_ex($name, strtolower($lang), $s);
     28        $l = strtolower($lang);
     29        $file = get_language_file_ex($name, $l, $s);
     30        if (!isset($file)) {
     31            $l = strtok($l, '-');
     32            $file = get_language_file_ex($name, $l, $s);
     33        }
    2934    }
    3035    else if (!empty($_SERVER['HTTP_ACCEPT_LANGUAGE'])) {
Note: See TracChangeset for help on using the changeset viewer.