<?phpclass TR { // Store our translations in the static array so we don't load them twice public static $tr = array(); public static function _($string) { // If the translations haven't been loaded yet, // do so now. if (empty(self::$tr)) { $tmp = ConfigCache::checkConfig('config/translation.ini'); if (strlen($tmp) > 0) { self::$tr = require_once($tmp); } } // If MODE is defined and is set to NY, // translate the string if (defined("AG_MODE") && AG_MODE == "NY") { if (isset(self::$tr['translation'][$string])) { return self::$tr['translation'][$string]; } } // If MODE isn't set or the translation wasn't found, // return the string untranslated return $string; }}?>