예제 #1
0
파일: karen.php 프로젝트: TeaMeow/Karen
 /**
  * Load Language
  * 
  * Load the language and import the translated strings 
  * if the language file does exist.
  * 
  * @param bool $default   Set true to load the default language library instead of load 
  *                        the library of the current language.
  */
 static function loadLanguage($default = false)
 {
     $language = $default ? self::$defaultLanguage : self::$language;
     $path = self::$languagePath . $language . '/' . self::$textDomain . '.php';
     if (file_exists($path)) {
         require $path;
         if ($default) {
             self::$library = $library;
         } else {
             self::$defaultLibrary = $library;
         }
     }
 }