当前位置: 首页>>代码示例>>PHP>>正文


PHP oxRegistry::getLang方法代码示例

本文整理汇总了PHP中oxRegistry::getLang方法的典型用法代码示例。如果您正苦于以下问题:PHP oxRegistry::getLang方法的具体用法?PHP oxRegistry::getLang怎么用?PHP oxRegistry::getLang使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在oxRegistry的用法示例。


在下文中一共展示了oxRegistry::getLang方法的15个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的PHP代码示例。

示例1: translate

 /**
  * Get translated string by the translation code.
  *
  * @param string  $sCode
  * @param boolean $blUseModulePrefix If True - adds the module translations prefix, if False - not.
  *
  * @return string
  */
 public function translate($sCode, $blUseModulePrefix = true)
 {
     if ($blUseModulePrefix) {
         $sCode = 'HBO_VARMAPPER_' . $sCode;
     }
     return oxRegistry::getLang()->translateString($sCode, oxRegistry::getLang()->getBaseLanguage(), false);
 }
开发者ID:hboers,项目名称:oxid-varmapper,代码行数:15,代码来源:hbovarmappermodule.php

示例2: render

 /**
  * Executes parent method parent::render(), creates oxlist object and
  * collects user groups information, passes data to Smarty engine,
  * returns name of template file "news_main.tpl".
  *
  * @return string
  */
 public function render()
 {
     $myConfig = $this->getConfig();
     parent::render();
     // all usergroups
     $oGroups = oxNew("oxlist");
     $oGroups->init("oxgroups");
     $oGroups->selectString("select * from " . getViewName("oxgroups", $this->_iEditLang));
     $soxId = $this->_aViewData["oxid"] = $this->getEditObjectId();
     if ($soxId != "-1" && isset($soxId)) {
         // load object
         $oNews = oxNew("oxnews");
         $oNews->loadInLang($this->_iEditLang, $soxId);
         $oOtherLang = $oNews->getAvailableInLangs();
         if (!isset($oOtherLang[$this->_iEditLang])) {
             // echo "language entry doesn't exist! using: ".key($oOtherLang);
             $oNews->loadInLang(key($oOtherLang), $soxId);
         }
         $this->_aViewData["edit"] = $oNews;
         // remove already created languages
         $this->_aViewData["posslang"] = array_diff(oxRegistry::getLang()->getLanguageNames(), $oOtherLang);
         foreach ($oOtherLang as $id => $language) {
             $oLang = new stdClass();
             $oLang->sLangDesc = $language;
             $oLang->selected = $id == $this->_iEditLang;
             $this->_aViewData["otherlang"][$id] = clone $oLang;
         }
     }
     if (oxRegistry::getConfig()->getRequestParameter("aoc")) {
         $oNewsMainAjax = oxNew('news_main_ajax');
         $this->_aViewData['oxajax'] = $oNewsMainAjax->getColumns();
         return "popups/news_main.tpl";
     }
     return "news_main.tpl";
 }
开发者ID:ioanok,项目名称:symfoxid,代码行数:42,代码来源:news_main.php

示例3: render

 /**
  * Executes parent method parent::render(), creates oxOrder, passes
  * it's data to Smarty engine and returns name of template file
  * "order_overview.tpl".
  *
  * @return string
  */
 public function render()
 {
     $myConfig = $this->getConfig();
     parent::render();
     $oOrder = oxNew("oxOrder");
     $oCur = $myConfig->getActShopCurrencyObject();
     $oLang = oxRegistry::getLang();
     $soxId = $this->getEditObjectId();
     if ($soxId != "-1" && isset($soxId)) {
         // load object
         $oOrder->load($soxId);
         $this->_aViewData["edit"] = $oOrder;
         $this->_aViewData["aProductVats"] = $oOrder->getProductVats();
         $this->_aViewData["orderArticles"] = $oOrder->getOrderArticles();
         $this->_aViewData["giftCard"] = $oOrder->getGiftCard();
         $this->_aViewData["paymentType"] = $this->_getPaymentType($oOrder);
         $this->_aViewData["deliveryType"] = $oOrder->getDelSet();
         $sTsProtectsField = 'oxorder__oxtsprotectcosts';
         if ($oOrder->{$sTsProtectsField}->value) {
             $this->_aViewData["tsprotectcosts"] = $oLang->formatCurrency($oOrder->{$sTsProtectsField}->value, $oCur);
         }
     }
     // orders today
     $dSum = $oOrder->getOrderSum(true);
     $this->_aViewData["ordersum"] = $oLang->formatCurrency($dSum, $oCur);
     $this->_aViewData["ordercnt"] = $oOrder->getOrderCnt(true);
     // ALL orders
     $dSum = $oOrder->getOrderSum();
     $this->_aViewData["ordertotalsum"] = $oLang->formatCurrency($dSum, $oCur);
     $this->_aViewData["ordertotalcnt"] = $oOrder->getOrderCnt();
     $this->_aViewData["afolder"] = $myConfig->getConfigParam('aOrderfolder');
     $this->_aViewData["alangs"] = $oLang->getLanguageNames();
     $this->_aViewData["currency"] = $oCur;
     return "order_overview.tpl";
 }
开发者ID:mibexx,项目名称:oxid_yttutorials,代码行数:42,代码来源:order_overview.php

示例4: render

 /**
  * Executes parent method parent::render(), creates oxwrapping, oxshops and oxlist
  * objects, passes data to Smarty engine and returns name of template
  * file "wrapping_main.tpl".
  *
  * @return string
  */
 public function render()
 {
     parent::render();
     $soxId = $this->_aViewData["oxid"] = $this->getEditObjectId();
     if ($soxId != "-1" && isset($soxId)) {
         // load object
         $oWrapping = oxNew("oxwrapping");
         $oWrapping->loadInLang($this->_iEditLang, $soxId);
         $oOtherLang = $oWrapping->getAvailableInLangs();
         if (!isset($oOtherLang[$this->_iEditLang])) {
             // echo "language entry doesn't exist! using: ".key($oOtherLang);
             $oWrapping->loadInLang(key($oOtherLang), $soxId);
         }
         $this->_aViewData["edit"] = $oWrapping;
         // remove already created languages
         $aLang = array_diff(oxRegistry::getLang()->getLanguageNames(), $oOtherLang);
         if (count($aLang)) {
             $this->_aViewData["posslang"] = $aLang;
         }
         foreach ($oOtherLang as $id => $language) {
             $oLang = new stdClass();
             $oLang->sLangDesc = $language;
             $oLang->selected = $id == $this->_iEditLang;
             $this->_aViewData["otherlang"][$id] = clone $oLang;
         }
     }
     return "wrapping_main.tpl";
 }
开发者ID:ioanok,项目名称:symfoxid,代码行数:35,代码来源:wrapping_main.php

示例5: request_product

 public function request_product()
 {
     $myConfig = $this->getConfig();
     $myUtils = oxRegistry::getUtils();
     //control captcha
     $sMac = oxRegistry::getConfig()->getRequestParameter('c_mac');
     $sMacHash = oxRegistry::getConfig()->getRequestParameter('c_mach');
     $oCaptcha = $this->getCaptcha();
     if (!$oCaptcha->pass($sMac, $sMacHash)) {
         oxRegistry::get("oxUtilsView")->addErrorToDisplay('MESSAGE_WRONG_VERIFICATION_CODE');
         return;
     }
     /** @var oxMailValidator $oMailValidator */
     $oMailValidator = oxNew('oxMailValidator');
     $aParams = oxRegistry::getConfig()->getRequestParameter('pa');
     if (!isset($aParams['email']) || !$oMailValidator->isValidEmail($aParams['email'])) {
         oxRegistry::get("oxUtilsView")->addErrorToDisplay('MESSAGE_INVALID_EMAIL');
         return;
     }
     $aParams['aid'] = $this->getProduct()->getId();
     $oArticleRequest = oxNew("psarticlerequest");
     $oArticleRequest->psarticlerequest__oxuserid = new oxField(oxRegistry::getSession()->getVariable('usr'));
     $oArticleRequest->psarticlerequest__oxemail = new oxField($aParams['email']);
     $oArticleRequest->psarticlerequest__oxartid = new oxField($aParams['aid']);
     $oArticleRequest->psarticlerequest__oxshopid = new oxField($myConfig->getShopId());
     $oArticleRequest->psarticlerequest__oxlang = new oxField(oxRegistry::getLang()->getBaseLanguage());
     $oArticleRequest->psarticlerequest__oxstatus = new oxField(psArticleRequest::STATUS_RECEIVED);
     $oArticleRequest->save();
     $oEmail = oxNew("oxEmail");
     $oEmail->sendArticleRequestNotification($aParams, $oArticleRequest);
     $this->_iArticleRequestStatus = 1;
     oxRegistry::get("oxUtilsView")->addErrorToDisplay('PS_ARTICLEREQUEST_SUCCESS');
 }
开发者ID:HFranz,项目名称:psArticleRequest,代码行数:33,代码来源:psarticlerequest_details.php

示例6: render

 /**
  * Add Languages to parameters.
  *
  * @return string
  */
 public function render()
 {
     $return = parent::render();
     $oLang = oxRegistry::getLang();
     $this->_aViewData["alangs"] = $oLang->getLanguageNames();
     return $return;
 }
开发者ID:ioanok,项目名称:symfoxid,代码行数:12,代码来源:invoicepdforder_overview.php

示例7: render

 /**
  * Loads category object data, pases it to Smarty engine and returns
  * name of template file "category_text.tpl".
  *
  * @return string
  */
 public function render()
 {
     parent::render();
     $this->_aViewData['edit'] = $oCategory = oxNew('oxCategory');
     $soxId = $this->_aViewData["oxid"] = $this->getEditObjectId();
     if (isset($soxId) && $soxId != "-1") {
         // load object
         $iCatLang = oxRegistry::getConfig()->getRequestParameter("catlang");
         if (!isset($iCatLang)) {
             $iCatLang = $this->_iEditLang;
         }
         $this->_aViewData["catlang"] = $iCatLang;
         $oCategory->loadInLang($iCatLang, $soxId);
         //Disable editing for derived items
         if ($oCategory->isDerived()) {
             $this->_aViewData['readonly'] = true;
         }
         foreach (oxRegistry::getLang()->getLanguageNames() as $id => $language) {
             $oLang = new stdClass();
             $oLang->sLangDesc = $language;
             $oLang->selected = $id == $this->_iEditLang;
             $this->_aViewData["otherlang"][$id] = clone $oLang;
         }
     }
     $this->_aViewData["editor"] = $this->_generateTextEditor("100%", 300, $oCategory, "oxcategories__oxlongdesc", "list.tpl.css");
     return "category_text.tpl";
 }
开发者ID:Crease29,项目名称:oxideshop_ce,代码行数:33,代码来源:category_text.php

示例8: render

 /**
  * Executes parent method parent::render(),
  * and returns name of template file
  * "object_main.tpl".
  *
  * @return string
  */
 public function render()
 {
     parent::render();
     if ($sType = $this->_getType()) {
         $oObject = oxNew($sType);
         if ($oObject->load($this->getEditObjectId())) {
             $oOtherLang = $oObject->getAvailableInLangs();
             if (!isset($oOtherLang[$iLang])) {
                 $oObject->loadInLang(key($oOtherLang), $this->getEditObjectId());
             }
             $this->_aViewData['edit'] = $oObject;
         }
         if ($oObject->isDerived()) {
             $this->_aViewData['readonly'] = true;
         }
     }
     $iLang = $this->getEditLang();
     $aLangs = oxRegistry::getLang()->getLanguageNames();
     foreach ($aLangs as $sLangId => $sLanguage) {
         $oLang = new stdClass();
         $oLang->sLangDesc = $sLanguage;
         $oLang->selected = $sLangId == $iLang;
         $this->_aViewData['otherlang'][$sLangId] = clone $oLang;
     }
     return 'object_seo.tpl';
 }
开发者ID:Crease29,项目名称:oxideshop_ce,代码行数:33,代码来源:object_seo.php

示例9: updateSeoUrls

 public static function updateSeoUrls()
 {
     $shop_id = oxRegistry::getConfig()->getShopId();
     self::cleanup();
     // prevent duplicate entries
     $aLanguages = oxRegistry::getLang()->getLanguageArray();
     $defaultLang = oxRegistry::getConfig()->getConfigParam('sDefaultLang');
     $basedir = oxRegistry::getConfig()->getConfigParam('styla_seo_basedir');
     if ($basedir == '') {
         $basedir = self::STYLA_BASEDIR;
     }
     $basedir = rtrim($basedir, '/') . '/';
     foreach (self::$_urls as $item) {
         foreach ($aLanguages as $lang) {
             $oxId = md5(uniqid());
             if ($lang->id == $defaultLang) {
                 $lang_prefix = '';
             } else {
                 $lang_prefix = $lang->abbr . '/';
             }
             $url = $lang_prefix . $basedir . $item['seo_action'];
             $sQuery = "INSERT INTO `oxseo` (`OXOBJECTID`, `OXIDENT`, `OXSHOPID`, `OXLANG`, `OXSTDURL`, `OXSEOURL`, `OXTYPE`, `OXFIXED`, `OXEXPIRED`, `OXPARAMS`) VALUES\n                  ('" . $oxId . "', '" . md5(strtolower($url)) . "', '" . $shop_id . "', {$lang->id}, '" . $item['orig_url'] . "', '" . $url . "', 'static', 0, 0, '');";
             oxDb::getDb()->Execute($sQuery);
         }
     }
 }
开发者ID:styladev,项目名称:oxid,代码行数:26,代码来源:StylaSEO_Setup.php

示例10: sendArticleRequestToCustomer

 public function sendArticleRequestToCustomer($sRecipient, $oArticleRequest, $sBody = null, $sReturnMailBody = null)
 {
     $this->_clearMailer();
     $oViewConfig = oxNew("oxViewConfig");
     $oShop = $this->_getShop();
     $iRequestLang = $oArticleRequest->psarticlerequest__oxlang->value;
     $oLang = oxRegistry::getLang();
     if ($oShop->getId() != $oArticleRequest->psarticlerequest__oxshopid->value) {
         $oShop = oxNew("oxshop");
         $oShop->load($oArticleRequest->psarticlerequest__oxshopid->value);
         $this->setShop($oShop);
     }
     //set mail params (from, fromName, smtp)
     $this->_setMailParams($oShop);
     // create messages
     $oSmarty = $this->_getSmarty();
     $oArticle = $oArticleRequest->getArticle();
     $this->setViewData("product", $oArticle);
     $this->setViewData("oArticleRequest", $oArticleRequest);
     // Process view data array through oxoutput processor
     $this->_processViewArray();
     $this->setRecipient($sRecipient, $sRecipient);
     $this->setSubject($oLang->translateString('PS_ARTICLEREQUEST_SEND_SUBJECT_AV', $iRequestLang) . " " . $oArticle->oxarticles__oxtitle->value);
     if ($sBody === null) {
         $sBody = $oSmarty->fetch($this->_sArticleRequestCustomerTemplate);
     }
     $this->setBody($sBody);
     $this->addAddress($sRecipient, $sRecipient);
     $this->setReplyTo($oShop->oxshops__oxorderemail->value, $oShop->oxshops__oxname->getRawValue());
     if ($sReturnMailBody) {
         return $this->getBody();
     } else {
         return $this->send();
     }
 }
开发者ID:HFranz,项目名称:psArticleRequest,代码行数:35,代码来源:psarticlerequest_oxemail.php

示例11: _doStartUpChecks

 /**
  * Extends the startup checks with Barzahlen plugin version check.
  *
  * @return array
  */
 protected function _doStartUpChecks()
 {
     $aMessage = parent::_doStartUpChecks();
     $oxConfig = $this->getConfig();
     $sShopId = $oxConfig->getShopId();
     $sModule = oxConfig::OXMODULE_MODULE_PREFIX . $this->_sModuleId;
     $sPluginCheck = $oxConfig->getShopConfVar('bzPluginCheck', $sShopId, $sModule);
     // only check once a week
     if ($sPluginCheck != null && $sPluginCheck > strtotime("-1 week")) {
         return $aMessage;
     }
     $oxConfig->saveShopConfVar('str', 'bzPluginCheck', time(), $sShopId, $sModule);
     $sBzShopId = $oxConfig->getShopConfVar('bzShopId', $sShopId, $sModule);
     $sShopsystem = 'OXID 4.7/5.0';
     $sShopsystemVersion = $oxConfig->getVersion();
     $sPluginVersion = self::CURRENTVERSION;
     try {
         $oChecker = new Barzahlen_Version_Check();
         $newAvailable = $oChecker->isNewVersionAvailable($sBzShopId, $sShopsystem, $sShopsystemVersion, $sPluginVersion);
     } catch (Exception $e) {
         oxRegistry::getUtils()->writeToLog(date('c') . " " . $e . "\r\r", self::LOGFILE);
     }
     if ($newAvailable) {
         $aMessage['warning'] .= (!empty($aMessage['warning']) ? "<br>" : '') . sprintf(oxRegistry::getLang()->translateString('BZ__NEW_PLUGIN_AVAILABLE'), $oChecker->getNewPluginVersion(), $oChecker->getNewPluginUrl());
     }
     return $aMessage;
 }
开发者ID:alexschwarz89,项目名称:Barzahlen-OXID-4.7,代码行数:32,代码来源:bz_barzahlen_navigation.php

示例12: render

 /**
  * Executes parent method parent::render(), creates oxgroups object,
  * passes data to Smarty engine and returns name of template file
  * "usergroup_main.tpl".
  *
  * @return string
  */
 public function render()
 {
     parent::render();
     $soxId = $this->_aViewData["oxid"] = $this->getEditObjectId();
     if (isset($soxId) && $soxId != "-1") {
         // load object
         $oGroup = oxNew("oxgroups");
         $oGroup->loadInLang($this->_iEditLang, $soxId);
         $oOtherLang = $oGroup->getAvailableInLangs();
         if (!isset($oOtherLang[$this->_iEditLang])) {
             // echo "language entry doesn't exist! using: ".key($oOtherLang);
             $oGroup->loadInLang(key($oOtherLang), $soxId);
         }
         $this->_aViewData["edit"] = $oGroup;
         // remove already created languages
         $aLang = array_diff(oxRegistry::getLang()->getLanguageNames(), $oOtherLang);
         if (count($aLang)) {
             $this->_aViewData["posslang"] = $aLang;
         }
         foreach ($oOtherLang as $id => $language) {
             $oLang = new stdClass();
             $oLang->sLangDesc = $language;
             $oLang->selected = $id == $this->_iEditLang;
             $this->_aViewData["otherlang"][$id] = clone $oLang;
         }
     }
     if (oxRegistry::getConfig()->getRequestParameter("aoc")) {
         $oUsergroupMainAjax = oxNew('usergroup_main_ajax');
         $this->_aViewData['oxajax'] = $oUsergroupMainAjax->getColumns();
         return "popups/usergroup_main.tpl";
     }
     return "usergroup_main.tpl";
 }
开发者ID:Crease29,项目名称:oxideshop_ce,代码行数:40,代码来源:usergroup_main.php

示例13: render

 /**
  * Executes parent method parent::render(), creates oxuser and oxbase objects,
  * passes data to Smarty engine and returns name of template file
  * "user_address.tpl".
  *
  * @return string
  */
 public function render()
 {
     parent::render();
     $soxId = $this->getEditObjectId();
     if ($soxId != "-1" && isset($soxId)) {
         // load object
         $oUser = oxNew("oxuser");
         $oUser->load($soxId);
         // load adress
         $sAddressIdParameter = oxRegistry::getConfig()->getRequestParameter("oxaddressid");
         $soxAddressId = isset($this->sSavedOxid) ? $this->sSavedOxid : $sAddressIdParameter;
         if ($soxAddressId != "-1" && isset($soxAddressId)) {
             $oAdress = oxNew("oxaddress");
             $oAdress->load($soxAddressId);
             $this->_aViewData["edit"] = $oAdress;
         }
         $this->_aViewData["oxaddressid"] = $soxAddressId;
         // generate selected
         $oAddressList = $oUser->getUserAddresses();
         foreach ($oAddressList as $oAddress) {
             if ($oAddress->oxaddress__oxid->value == $soxAddressId) {
                 $oAddress->selected = 1;
                 break;
             }
         }
         $this->_aViewData["edituser"] = $oUser;
     }
     $oCountryList = oxNew("oxCountryList");
     $oCountryList->loadActiveCountries(oxRegistry::getLang()->getObjectTplLanguage());
     $this->_aViewData["countrylist"] = $oCountryList;
     if (!$this->_allowAdminEdit($soxId)) {
         $this->_aViewData['readonly'] = true;
     }
     return "user_address.tpl";
 }
开发者ID:ioanok,项目名称:symfoxid,代码行数:42,代码来源:user_address.php

示例14: render

 /**
  * Creates shop object, passes shop data to Smarty engine and returns name of
  * template file "dyn_trusted.tpl".
  *
  * @return string
  */
 public function render()
 {
     parent::render();
     $this->_aViewData['oxid'] = $this->getConfig()->getShopId();
     $this->_aViewData["alllang"] = oxRegistry::getLang()->getLanguageArray();
     return "dyn_trusted_ratings.tpl";
 }
开发者ID:Crease29,项目名称:oxideshop_ce,代码行数:13,代码来源:dyn_trusted_ratings.php

示例15: render

 /**
  * Executes parent method parent::render(), creates oxnews object and
  * passes news text to smarty. Returns name of template file "news_text.tpl".
  *
  * @return string
  */
 public function render()
 {
     parent::render();
     $soxId = $this->_aViewData["oxid"] = $this->getEditObjectId();
     if (isset($soxId) && $soxId != "-1") {
         // load object
         $oNews = oxNew("oxnews");
         $iNewsLang = oxRegistry::getConfig()->getRequestParameter("newslang");
         if (!isset($iNewsLang)) {
             $iNewsLang = $this->_iEditLang;
         }
         $this->_aViewData["newslang"] = $iNewsLang;
         $oNews->loadInLang($iNewsLang, $soxId);
         foreach (oxRegistry::getLang()->getLanguageNames() as $id => $language) {
             $oLang = new stdClass();
             $oLang->sLangDesc = $language;
             $oLang->selected = $id == $this->_iEditLang;
             $this->_aViewData["otherlang"][$id] = clone $oLang;
         }
         // Disable editing for derived items.
         if ($oNews->isDerived()) {
             $this->_aViewData['readonly'] = true;
         }
         $this->_aViewData["edit"] = $oNews;
     }
     $this->_aViewData["editor"] = $this->_generateTextEditor("100%", 255, $oNews, "oxnews__oxlongdesc", "news.tpl.css");
     return "news_text.tpl";
 }
开发者ID:Crease29,项目名称:oxideshop_ce,代码行数:34,代码来源:news_text.php


注:本文中的oxRegistry::getLang方法示例由纯净天空整理自Github/MSDocs等开源代码及文档管理平台,相关代码片段筛选自各路编程大神贡献的开源项目,源码版权归原作者所有,传播和使用请参考对应项目的License;未经允许,请勿转载。