From 2983057ad91ccdef1fef86a85fe8e888350c3384 Mon Sep 17 00:00:00 2001 From: xue <> Date: Sun, 16 Apr 2006 14:43:51 +0000 Subject: Fixed a few issues with using Globalization. --- framework/PradoBase.php | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) (limited to 'framework/PradoBase.php') diff --git a/framework/PradoBase.php b/framework/PradoBase.php index 329bb5da..e0c8cc52 100644 --- a/framework/PradoBase.php +++ b/framework/PradoBase.php @@ -533,14 +533,14 @@ class PradoBase public static function localize($text, $parameters=array(), $catalogue=null, $charset=null) { Prado::using('System.I18N.Translation'); - $app = Prado::getApplication()->getGlobalization(); + $app = Prado::getApplication()->getGlobalization(false); $params = array(); foreach($parameters as $key => $value) $params['{'.$key.'}'] = $value; //no translation handler provided - if(($config = $app->getTranslationConfiguration())===null) + if($app===null || ($config = $app->getTranslationConfiguration())===null) return strtr($text, $params); Translation::init(); -- cgit v1.2.3