Skip to content

Commit

Permalink
Tweak Language Include Regex
Browse files Browse the repository at this point in the history
  • Loading branch information
Brendan committed Mar 27, 2010
1 parent 511a242 commit 46458ed
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions symphony/lib/toolkit/class.lang.php
Expand Up @@ -325,7 +325,7 @@ public static function getAvailableLanguages($ExtensionManager=false) {
public static function getLanguageCodes($path, $languages) {
$iterator = new DirectoryIterator($path);
foreach($iterator as $file) {
if(!$file->isDot() && preg_match('/lang\.(\w+(-\w+)?)\.php$/', $file->getFilename(), $matches)) {
if(!$file->isDot() && preg_match('/^lang\.(\w+(-\w+)?)\.php$/', $file->getFilename(), $matches)) {
if(!isset($languages[$matches[1]])) {
include($file->getPathname());
$languages[$matches[1]] = $about['name'];
Expand All @@ -336,4 +336,4 @@ public static function getLanguageCodes($path, $languages) {
}

}


0 comments on commit 46458ed

Please sign in to comment.