public static function init(Dog_WorkerThread $worker) { Dog::setWorker($worker); Dog_Lang::init(); self::initModules(); foreach (Dog_Server::getAllServers() as $server) { $server instanceof Dog_Server; if ($server->isActive()) { Dog::addServer($server); } } Dog_Timer::init(self::getSleepMillis()); Dog_Timer::addTimer(array(__CLASS__, 'initTimers'), NULL, count(Dog::getServers()) * Dog::CONNECT_WAIT + 1, false); Dog_Timer::addTimer(array('Dog', 'botReady'), NULL, count(Dog::getServers()) * Dog::CONNECT_WAIT + 2, false); self::$STARTUP_TIME = microtime(true); return true; }
public static function init() { self::$LANG = new GWF_LangTrans(DOG_PATH . 'dog_lang/dog'); }
public static function displayTypeS($type) { return Dog_Lang::lang("vart_{$type}"); }
private static function createHelpLangFile() { # Get current english from src. $help = Shadowhelp::getAllHelp(); $help = self::prepareHelpArrayForLangFiles($help); # Update existing. foreach (Dog_Lang::getISOCodes() as $iso) { $path = Shadowrun4::getShadowDir() . "lang/help/shadowhelp_{$iso}.php"; if (false === ($lang = GWF_Language::getByISO($iso))) { $lang = GWF_Language::getEnglish(); } if (false === self::createHelpLangFileB($lang, $path, $help, false)) { return false; } } # Build english from source. $path = Shadowrun4::getShadowDir() - 'lang/item/shadowitems_en.php'; return self::createHelpLangFileB(GWF_Language::getEnglish(), $path, $help, true); }
public static function lang($key, $args = NULL) { return Dog_Lang::langISO(self::getLangISO(), $key, $args); }