Ejemplo n.º 1
0
 /**
  * Function returns shop url by given language.
  * #680 per language another URL
  *
  * @param integer $lang Language id.
  * @param bool    $ssl  Whether to use ssl.
  *
  * @return null|string
  */
 public function getShopUrlByLanguage($lang, $ssl = false)
 {
     $configParameter = $ssl ? 'aLanguageSSLURLs' : 'aLanguageURLs';
     $lang = isset($lang) ? $lang : Registry::getLang()->getBaseLanguage();
     $languageURLs = $this->getConfigParam($configParameter);
     if (isset($lang) && isset($languageURLs[$lang]) && !empty($languageURLs[$lang])) {
         $languageURLs[$lang] = Registry::getUtils()->checkUrlEndingSlash($languageURLs[$lang]);
         return $languageURLs[$lang];
     }
 }
Ejemplo n.º 2
0
 /**
  * Returns language table name
  *
  * @param string $sTable  table name
  * @param int    $iLangId language id
  *
  * @return string
  */
 function getLangTableName($sTable, $iLangId)
 {
     $iTableIdx = getLangTableIdx($iLangId);
     if ($iTableIdx && in_array($sTable, Registry::getLang()->getMultiLangTables())) {
         $sLangTableSuffix = Registry::getConfig()->getConfigParam("sLangTableSuffix");
         $sLangTableSuffix = $sLangTableSuffix ? $sLangTableSuffix : "_set";
         $sTable .= $sLangTableSuffix . $iTableIdx;
     }
     return $sTable;
 }
Ejemplo n.º 3
0
 public function testGetLang()
 {
     $oSubj = Registry::getLang();
     $this->assertTrue($oSubj instanceof \OxidEsales\EshopCommunity\Core\Language);
 }