Show
Ignore:
Timestamp:
02/29/2008 04:48:53 PM (10 months ago)
Author:
Shadowhand
Message:

Fixing a bug with r2200.

Files:
1 modified

Legend:

Unmodified
Added
Removed
  • trunk/system/core/Kohana.php

    r2202 r2203  
    687687                        return $found[$hash]; 
    688688 
    689                 if ($directory == 'config' OR $directory == 'i18n') 
     689                if ($directory == 'config' OR $directory == 'i18n' OR $directory === 'l10n') 
    690690                { 
    691691                        $fnd = array(); 
     
    843843                static $locale = array(); 
    844844 
    845                 // Extract the main group from the key 
    846                 $group = explode('.', $key, 2); 
    847                 $group = $group[0]; 
    848  
    849                 if (empty($language[$group])) 
     845                if (empty($locale)) 
    850846                { 
    851847                        // Messages from this file 
     
    857853                        // Loop through the files and include each one, so SYSPATH files 
    858854                        // can be overloaded by more localized files 
    859                         foreach(self::find_file('i10n', $filename) as $file) 
     855                        foreach(self::find_file('l10n', $filename) as $file) 
    860856                        { 
    861857                                include $file; 
     
    866862                                        foreach($locale as $k => $v) 
    867863                                        { 
    868                                                 $messages[$k] = $v; 
     864                                                $locale[$k] = $v; 
    869865                                        } 
    870866                                } 
    871867                        } 
    872  
    873                         // Cache the type 
    874                         $language[$group] = $messages; 
    875868                } 
    876869 
    877870                // Get the line from the language 
    878                 $line = self::key_string($key, $language); 
     871                $line = self::key_string($key, $locale); 
    879872 
    880873                // Return the key string as fallback