35 $aLangData[
'params'] =
$myConfig->getConfigParam(
'aLanguageParams');
36 $aLangData[
'lang'] =
$myConfig->getConfigParam(
'aLanguages');
37 $aLangData[
'urls'] =
$myConfig->getConfigParam(
'aLanguageURLs');
38 $aLangData[
'sslUrls'] =
$myConfig->getConfigParam(
'aLanguageSSLURLs');
40 $iBaseId = (int) $aLangData[
'params'][$sOxId][
'baseId'];
44 $oEx =
oxNew(
"oxExceptionToDisplay");
45 $oEx->setMessage(
'LANGUAGE_DELETINGMAINLANG_WARNING');
52 unset($aLangData[
'params'][$sOxId]);
53 unset($aLangData[
'lang'][$sOxId]);
54 unset($aLangData[
'urls'][$iBaseId]);
55 unset($aLangData[
'sslUrls'][$iBaseId]);
58 $myConfig->saveShopConfVar(
'aarr',
'aLanguageParams', $aLangData[
'params']);
59 $myConfig->saveShopConfVar(
'aarr',
'aLanguages', $aLangData[
'lang']);
60 $myConfig->saveShopConfVar(
'arr',
'aLanguageURLs', $aLangData[
'urls']);
61 $myConfig->saveShopConfVar(
'arr',
'aLanguageSSLURLs', $aLangData[
'sslUrls']);
64 if ($iBaseId ==
$myConfig->getConfigParam(
'sDefaultLang')) {
65 $myConfig->saveShopConfVar(
'str',
'sDefaultLang', 0);
85 return "language_list.tpl";
95 $aLangParams = $this->
getConfig()->getConfigParam(
'aLanguageParams');
97 $sDefaultLang = $this->
getConfig()->getConfigParam(
'sDefaultLang');
100 $sOxId = $sValue->oxid;
101 $aLanguages[$sKey]->active = (!isset($aLangParams[$sOxId][
"active"])) ? 1 : $aLangParams[$sOxId][
"active"];
102 $aLanguages[$sKey]->default = ($aLangParams[$sOxId][
"baseId"] == $sDefaultLang) ?
true :
false;
103 $aLanguages[$sKey]->sort = $aLangParams[$sOxId][
"sort"];
106 if (is_array($aLangParams)) {
109 if (is_array($aSorting)) {
110 foreach ($aSorting as $aFieldSorting) {
111 foreach ($aFieldSorting as $sField => $sDir) {
112 $this->_sDefSortField = $sField;
113 $this->_sDefSortOrder = $sDir;
115 if ($sField ==
'active') {
117 $this->_sDefSortOrder =
'desc';
124 uasort(
$aLanguages, array($this,
'_sortLanguagesCallback'));
142 $sVal1 = is_string($oLang1->$sSortParam) ? strtolower($oLang1->$sSortParam) : $oLang1->$sSortParam;
143 $sVal2 = is_string($oLang2->$sSortParam) ? strtolower($oLang2->$sSortParam) : $oLang2->$sSortParam;
145 if ($this->_sDefSortOrder ==
'asc') {
146 return ($sVal1 < $sVal2) ? -1 : 1;
148 return ($sVal1 > $sVal2) ? -1 : 1;
160 $iLangId = (int) $iLangId;
168 $oDbMeta =
oxNew(
"oxDbMetaDataHandler");
169 $oDbMeta->resetLanguage($iLangId);
178 $oEx =
oxNew(
"oxExceptionToDisplay");
179 $oEx->setMessage(
'LANGUAGE_ERROR_RESETING_MULTILANG_FIELDS');