Browse Source

Fixed matching all case.

tags/2.0.0-beta
Qiang Xue 12 years ago
parent
commit
39f6e00137
  1. 2
      framework/yii/i18n/I18N.php

2
framework/yii/i18n/I18N.php

@ -113,7 +113,7 @@ class I18N extends Component
} else { } else {
// try wildcard matching // try wildcard matching
foreach ($this->translations as $pattern => $config) { foreach ($this->translations as $pattern => $config) {
if (substr($pattern, -1) === '*' && strpos($category, rtrim($pattern, '*')) === 0) { if ($pattern === '*' || substr($pattern, -1) === '*' && strpos($category, rtrim($pattern, '*')) === 0) {
$source = $config; $source = $config;
break; break;
} }

Loading…
Cancel
Save