added lang_path constant.

This commit is contained in:
Taylor Otwell 2011-07-26 23:26:04 -05:00
parent c76d0fb669
commit 0ca2171071
2 changed files with 2 additions and 1 deletions

View File

@ -22,6 +22,7 @@
define('CACHE_PATH', APP_PATH.'storage/cache/'); define('CACHE_PATH', APP_PATH.'storage/cache/');
define('CONFIG_PATH', APP_PATH.'config/'); define('CONFIG_PATH', APP_PATH.'config/');
define('DATABASE_PATH', APP_PATH.'storage/db/'); define('DATABASE_PATH', APP_PATH.'storage/db/');
define('LANG_PATH', APP_PATH.'lang/');
define('LIBRARY_PATH', APP_PATH.'libraries/'); define('LIBRARY_PATH', APP_PATH.'libraries/');
define('MODEL_PATH', APP_PATH.'models/'); define('MODEL_PATH', APP_PATH.'models/');
define('PACKAGE_PATH', APP_PATH.'packages/'); define('PACKAGE_PATH', APP_PATH.'packages/');

View File

@ -119,7 +119,7 @@ private function load($file, $language)
{ {
if (array_key_exists($language.$file, static::$lines)) return; if (array_key_exists($language.$file, static::$lines)) return;
if (file_exists($path = APP_PATH.'lang/'.$language.'/'.$file.EXT)) if (file_exists($path = LANG_PATH.$language.'/'.$file.EXT))
{ {
static::$lines[$language.$file] = require $path; static::$lines[$language.$file] = require $path;
} }