current() static public method

static public current ( )
コード例 #1
0
ファイル: kirby.php プロジェクト: sdvig/kirbycms
 /**
  * @todo rework
  */
 static function load($file)
 {
     // replace the language variable
     $file = str_replace('{language}', l::current(), $file);
     // check if it exists
     if (file_exists($file)) {
         require $file;
         return l::get();
     }
     // try to find the default language file
     $file = str_replace('{language}', c::get('language', 'en'), $file);
     // check again if it exists
     if (file_exists($file)) {
         require $file;
     }
     return l::get();
 }