修正多语言支持无法显示语言名称的bug
This commit is contained in:
祁宁 2015-01-19 14:09:14 +08:00
parent b0c4cc77a7
commit bcbb02b81e
2 changed files with 2 additions and 2 deletions

View File

@ -35,7 +35,7 @@ class Widget_Options_General extends Widget_Abstract_Options implements Widget_I
if (!empty($files)) {
foreach ($files as $file) {
$getText = new Typecho_I18n_GetText($file);
$getText = new Typecho_I18n_GetText($file, false);
list ($name) = explode('.', basename($file));
$title = $getText->translate('lang', $count);
$langs[$name] = $count > -1 ? $title : $name;

View File

@ -71,7 +71,7 @@ class Widget_Upload extends Widget_Abstract_Contents implements Widget_Interface
$info = pathinfo($name);
$name = substr($info['basename'], 1);
return isset($info['extension']) ? $info['extension'] : '';
return isset($info['extension']) ? strtolower($info['extension']) : '';
}
/**