Esempio n. 1
0
 protected function _preBootstrap()
 {
     if (!$this->_pm->getAccess()->isHeartbeat() && $this->_pm->getAccess()->isAdmin()) {
         // load the framework translation
         require_once $this->_pm->getPathinfo()->getRootLib() . '/IfwPsn/Wp/Proxy.php';
         IfwPsn_Wp_Proxy::loadTextdomain('ifw', false, $this->_pm->getPathinfo()->getDirname() . '/lib/IfwPsn/Wp/Translation');
         if (is_dir($this->_pm->getPathinfo()->getRootLang())) {
             $langRelPath = $this->_pm->getPathinfo()->getDirname() . '/lang';
             $result = IfwPsn_Wp_Proxy::loadTextdomain($this->_pm->getEnv()->getTextDomain(), false, $langRelPath);
         }
     }
 }
Esempio n. 2
0
 /**
  * Checks if plugin translation files exist and inits the plugin textdomain
  *
  * @return bool
  */
 protected function _initTranslation()
 {
     $result = false;
     if ($this->_pathinfo->hasRootLang()) {
         $langRelPath = $this->_pm->getPathinfo()->getDirname() . '/modules/' . $this->_pathinfo->getDirname() . '/lang';
         $result = IfwPsn_Wp_Proxy::loadTextdomain($this->getTextDomain(), false, $langRelPath);
     }
     return $result;
 }