change line endings for easy patching

This commit is contained in:
Daniel Seifert 2020-05-25 10:35:12 +02:00
parent aa6071a9f8
commit 75cc87b3f6
Signed by: DanielS
GPG Key ID: 8A7C4C6ED1915C6F
23 changed files with 2379 additions and 2379 deletions

BIN
.gitattributes vendored Normal file

Binary file not shown.

View File

@ -1,15 +1,15 @@
# D³ Übersetzungsassistent für OXID eShop
flexible Textbausteinverwaltung direkt im Adminbereich des Shops
## Systemanforderungen:
- installierter OXID eShop
- PHP-Version, für die Installationspakete verfügbar sind
- Installation via Composer
- ionCubeLoader
- D3 Modul Connector
Die jeweils geforderten Versionen und sonstige Anforderungen entnehmen Sie bitte der Dokumentation im docs-Verzeichnis dieses Paketes.
## Installation:
# D³ Übersetzungsassistent für OXID eShop
flexible Textbausteinverwaltung direkt im Adminbereich des Shops
## Systemanforderungen:
- installierter OXID eShop
- PHP-Version, für die Installationspakete verfügbar sind
- Installation via Composer
- ionCubeLoader
- D3 Modul Connector
Die jeweils geforderten Versionen und sonstige Anforderungen entnehmen Sie bitte der Dokumentation im docs-Verzeichnis dieses Paketes.
## Installation:
Eine detaillierte Installationsanleitung finden Sie im docs-Verzeichnis dieses Pakets.

View File

@ -1,43 +1,43 @@
{
"name": "d3/multilang",
"description": "Text item handler module for OXID eShop.",
"type": "oxideshop-module",
"keywords": [
"oxid",
"modules",
"eShop",
"d3",
"test items"
],
"authors": [
{
"name": "D3 Data Development (Inh. Thomas Dartsch)",
"email": "info@shopmodule.com",
"homepage": "http://www.d3data.de",
"role": "Owner"
}
],
"support": {
"email": "support@shopmodule.com"
},
"homepage": "https://www.oxidmodule.com/",
"license": [
"proprietary"
],
"extra": {
"oxideshop": {
"source-directory": "/src",
"target-directory": "d3/multilang"
}
},
"require": {
"php": "7.1 - 7.2", "ext-ionCube-Loader": "*",
"oxid-esales/oxideshop-metapackage-ce": "~6.0.2 || ~6.1.0",
"d3/modcfg": "^5.1.1.400"
},
"autoload": {
"psr-4": {
"D3\\Multilang\\": "../../../source/modules/d3/multilang"
}
}
}
{
"name": "d3/multilang",
"description": "Text item handler module for OXID eShop.",
"type": "oxideshop-module",
"keywords": [
"oxid",
"modules",
"eShop",
"d3",
"test items"
],
"authors": [
{
"name": "D3 Data Development (Inh. Thomas Dartsch)",
"email": "info@shopmodule.com",
"homepage": "http://www.d3data.de",
"role": "Owner"
}
],
"support": {
"email": "support@shopmodule.com"
},
"homepage": "https://www.oxidmodule.com/",
"license": [
"proprietary"
],
"extra": {
"oxideshop": {
"source-directory": "/src",
"target-directory": "d3/multilang"
}
},
"require": {
"php": "7.1 - 7.2", "ext-ionCube-Loader": "*",
"oxid-esales/oxideshop-metapackage-ce": "~6.0.2 || ~6.1.0",
"d3/modcfg": "^5.1.1.400"
},
"autoload": {
"psr-4": {
"D3\\Multilang\\": "../../../source/modules/d3/multilang"
}
}
}

View File

@ -1,6 +1,6 @@
Diese Modulversion stellt folgende Funktionen zur Verfügung:
- datenbankbasierte Textbausteinverwaltung
- Pflege komfortabel über Adminbereich des Shops
- Export in CSV- und Oxid-Format
Diese Modulversion stellt folgende Funktionen zur Verfügung:
- datenbankbasierte Textbausteinverwaltung
- Pflege komfortabel über Adminbereich des Shops
- Export in CSV- und Oxid-Format
- Einbindung über Modul-Erweiterung

View File

@ -1,33 +1,33 @@
<?php
namespace D3\Multilang\Application\Controller\Admin;
use D3\ModCfg\Application\Controller\Admin\d3_cfg_mod_;
/**
* This Software is the property of Data Development and is protected
* by copyright law - it is NOT Freeware.
* Any unauthorized use of this software without a valid license
* is a violation of the license agreement and will be prosecuted by
* civil and criminal law.
* http://www.shopmodule.com
*
* @copyright (C) D3 Data Development (Inh. Thomas Dartsch)
* @author D3 Data Development - Daniel Seifert <support@shopmodule.com>
* @link http://www.oxidmodule.com
*/
class d3_cfg_multilang extends d3_cfg_mod_
{
/**
* @return string
*/
public function render()
{
$this->addTplParam('sListClass', d3_cfg_multilang_list::class);
$this->addTplParam('sMainClass', d3_cfg_multilang_imex::class);
return parent::render();
}
}
<?php
namespace D3\Multilang\Application\Controller\Admin;
use D3\ModCfg\Application\Controller\Admin\d3_cfg_mod_;
/**
* This Software is the property of Data Development and is protected
* by copyright law - it is NOT Freeware.
* Any unauthorized use of this software without a valid license
* is a violation of the license agreement and will be prosecuted by
* civil and criminal law.
* http://www.shopmodule.com
*
* @copyright (C) D3 Data Development (Inh. Thomas Dartsch)
* @author D3 Data Development - Daniel Seifert <support@shopmodule.com>
* @link http://www.oxidmodule.com
*/
class d3_cfg_multilang extends d3_cfg_mod_
{
/**
* @return string
*/
public function render()
{
$this->addTplParam('sListClass', d3_cfg_multilang_list::class);
$this->addTplParam('sMainClass', d3_cfg_multilang_imex::class);
return parent::render();
}
}

View File

@ -1,226 +1,226 @@
<?php
namespace D3\Multilang\Application\Controller\Admin;
use D3\ModCfg\Application\Controller\Admin\d3_cfg_mod_main;
use D3\ModCfg\Application\Model\Configuration\d3_cfg_mod;
use D3\ModCfg\Application\Model\Exception\d3_cfg_mod_exception;
use D3\ModCfg\Application\Model\Exception\d3ShopCompatibilityAdapterException;
use D3\ModCfg\Application\Model\Maintenance\d3clrtmp;
use D3\Multilang\Application\Model\d3_translations;
use Doctrine\DBAL\DBALException;
use OxidEsales\Eshop\Core\Exception\DatabaseConnectionException;
use OxidEsales\Eshop\Core\Exception\DatabaseErrorException;
use OxidEsales\Eshop\Core\Exception\StandardException;
use OxidEsales\Eshop\Core\Registry;
/**
* This Software is the property of Data Development and is protected
* by copyright law - it is NOT Freeware.
* Any unauthorized use of this software without a valid license
* is a violation of the license agreement and will be prosecuted by
* civil and criminal law.
* http://www.shopmodule.com
*
* @copyright (C) D3 Data Development (Inh. Thomas Dartsch)
* @author D3 Data Development - Daniel Seifert <support@shopmodule.com>
* @link http://www.oxidmodule.com
*/
class d3_cfg_multilang_imex extends d3_cfg_mod_main
{
protected $_sThisTemplate = 'd3_cfg_multilang_imex.tpl';
protected $_sExportDir = 'export';
protected $_sModId = 'd3_multilang';
protected $_sExportType = '';
protected $_sImportType = '';
protected $_sMimeType = '';
protected $_aImportStatusMessage = array();
protected $_sMenuItemTitle = 'd3mxmultilang';
protected $_sMenuSubItemTitle = 'd3tbclmultilang_imex';
public $aMessages = array();
/**
* @return string
* @throws DBALException
* @throws DatabaseConnectionException
* @throws DatabaseErrorException
* @throws StandardException
* @throws d3ShopCompatibilityAdapterException
* @throws d3_cfg_mod_exception
*/
public function render()
{
$this->setImportStatusMessages();
$this->addTplParam('readonly', !$this->d3getSet()->isActive());
$oLang = Registry::getLang();
$aLangList = Registry::getRequest()->getRequestEscapedParameter('lang');
if (isset($aLangList) && is_array($aLangList) && isset($aLangList['oxid'])) {
$iLangNr = $aLangList['oxid'];
} else {
$iLangNr = 0;
}
$this->_aViewData['aImportLanguages'] = $oLang->getLanguageArray($iLangNr);
return parent::render();
}
/**
* @param $sMessage
*/
public function addStatusMessage($sMessage)
{
$this->aMessages[] = $sMessage;
}
/**
* @return array
*/
public function getStatusMessages()
{
return $this->aMessages;
}
/**
* @param $sIdent
*
* @return mixed
*/
public function getRequParam($sIdent)
{
return Registry::getRequest()->getRequestEscapedParameter($sIdent);
}
public function setImportStatusMessages()
{
$this->_aImportStatusMessage = array(
'csv' => array(
0 => 'D3_MULTILANG_NOT_SUCC',
1 => 'D3_MULTILANG_SUCC_CSV',
),
'xls' => array(
0 => 'D3_MULTILANG_NOT_SUCC',
1 => 'D3_MULTILANG_SUCC_XLS',
),
'oxid' => array(
0 => 'D3_MULTILANG_NOT_SUCC',
1 => 'D3_MULTILANG_SUCC_OXID',
),
);
}
/**
* @throws DBALException
* @throws DatabaseConnectionException
* @throws DatabaseErrorException
* @throws StandardException
* @throws d3ShopCompatibilityAdapterException
* @throws d3_cfg_mod_exception
*/
public function export()
{
/** @var d3_translations $oTranslation */
$oTranslation = oxNew(d3_translations::class);
$this->_sExportType = Registry::getRequest()->getRequestEscapedParameter('exporttype');
if ($this->getExportType() == 'csv') {
$oTranslation->exportCSV();
} elseif ($this->getExportType() == 'oxid') {
$oTranslation->exportOxid();
}
}
/**
* @return string
*/
public function getExportType()
{
return $this->_sExportType;
}
/**
* @throws DBALException
*/
public function import()
{
/** @var d3_translations $oTranslation */
$oTranslation = oxNew(d3_translations::class);
$oTranslation->setController($this);
header("Content-Type: text/html; charset=UTF-8");
$this->_sImportType = Registry::getRequest()->getRequestEscapedParameter('type');
try {
if ($this->getImportType() == 'csv') {
$this->_sMimeType = $_FILES['file']['type']['csv'];
$iImport = $oTranslation->importCSV();
$this->addTplParam('clrTmp', $iImport);
} elseif ($this->getImportType() == 'oxid') {
$this->_sMimeType = $_FILES['file']['type']['oxid'];
$iImport = $oTranslation->importOxid();
$this->addTplParam('clrTmp', $iImport);
} elseif ($this->getImportType() == 'installed') {
$iImport = $oTranslation->importInstalled();
$this->addTplParam('clrTmp', $iImport);
}
} catch (StandardException $e) {
Registry::getUtilsView()->addErrorToDisplay($e->getMessage());
}
}
/**
* @return string
*/
public function getImportType()
{
return $this->_sImportType;
}
/**
* @return null|string
* @throws DBALException
* @throws DatabaseConnectionException
* @throws DatabaseErrorException
*/
public function getMimeType()
{
if ($this->_sMimeType && $this->d3getSet()->getValue('blMultilang_OutputMimeType')) {
return $this->_sMimeType;
}
return null;
}
/**
* @throws DBALException
* @throws DatabaseConnectionException
* @throws DatabaseErrorException
* @throws d3ShopCompatibilityAdapterException
* @throws d3_cfg_mod_exception
* @throws StandardException
*/
public function clearLangCache()
{
/** @var d3clrtmp $oClrTmp */
$oClrTmp = oxNew(d3clrtmp::class);
if ($oClrTmp->clearLangCache()) {
$this->addStatusMessage(Registry::getLang()->translateString('D3_CFG_CLRTMP_SUCCESS'));
}
}
/**
* @return d3_cfg_mod
* @throws DBALException
* @throws DatabaseConnectionException
* @throws DatabaseErrorException
*/
public function d3getSet()
{
return d3_cfg_mod::get($this->_sModId);
}
}
<?php
namespace D3\Multilang\Application\Controller\Admin;
use D3\ModCfg\Application\Controller\Admin\d3_cfg_mod_main;
use D3\ModCfg\Application\Model\Configuration\d3_cfg_mod;
use D3\ModCfg\Application\Model\Exception\d3_cfg_mod_exception;
use D3\ModCfg\Application\Model\Exception\d3ShopCompatibilityAdapterException;
use D3\ModCfg\Application\Model\Maintenance\d3clrtmp;
use D3\Multilang\Application\Model\d3_translations;
use Doctrine\DBAL\DBALException;
use OxidEsales\Eshop\Core\Exception\DatabaseConnectionException;
use OxidEsales\Eshop\Core\Exception\DatabaseErrorException;
use OxidEsales\Eshop\Core\Exception\StandardException;
use OxidEsales\Eshop\Core\Registry;
/**
* This Software is the property of Data Development and is protected
* by copyright law - it is NOT Freeware.
* Any unauthorized use of this software without a valid license
* is a violation of the license agreement and will be prosecuted by
* civil and criminal law.
* http://www.shopmodule.com
*
* @copyright (C) D3 Data Development (Inh. Thomas Dartsch)
* @author D3 Data Development - Daniel Seifert <support@shopmodule.com>
* @link http://www.oxidmodule.com
*/
class d3_cfg_multilang_imex extends d3_cfg_mod_main
{
protected $_sThisTemplate = 'd3_cfg_multilang_imex.tpl';
protected $_sExportDir = 'export';
protected $_sModId = 'd3_multilang';
protected $_sExportType = '';
protected $_sImportType = '';
protected $_sMimeType = '';
protected $_aImportStatusMessage = array();
protected $_sMenuItemTitle = 'd3mxmultilang';
protected $_sMenuSubItemTitle = 'd3tbclmultilang_imex';
public $aMessages = array();
/**
* @return string
* @throws DBALException
* @throws DatabaseConnectionException
* @throws DatabaseErrorException
* @throws StandardException
* @throws d3ShopCompatibilityAdapterException
* @throws d3_cfg_mod_exception
*/
public function render()
{
$this->setImportStatusMessages();
$this->addTplParam('readonly', !$this->d3getSet()->isActive());
$oLang = Registry::getLang();
$aLangList = Registry::getRequest()->getRequestEscapedParameter('lang');
if (isset($aLangList) && is_array($aLangList) && isset($aLangList['oxid'])) {
$iLangNr = $aLangList['oxid'];
} else {
$iLangNr = 0;
}
$this->_aViewData['aImportLanguages'] = $oLang->getLanguageArray($iLangNr);
return parent::render();
}
/**
* @param $sMessage
*/
public function addStatusMessage($sMessage)
{
$this->aMessages[] = $sMessage;
}
/**
* @return array
*/
public function getStatusMessages()
{
return $this->aMessages;
}
/**
* @param $sIdent
*
* @return mixed
*/
public function getRequParam($sIdent)
{
return Registry::getRequest()->getRequestEscapedParameter($sIdent);
}
public function setImportStatusMessages()
{
$this->_aImportStatusMessage = array(
'csv' => array(
0 => 'D3_MULTILANG_NOT_SUCC',
1 => 'D3_MULTILANG_SUCC_CSV',
),
'xls' => array(
0 => 'D3_MULTILANG_NOT_SUCC',
1 => 'D3_MULTILANG_SUCC_XLS',
),
'oxid' => array(
0 => 'D3_MULTILANG_NOT_SUCC',
1 => 'D3_MULTILANG_SUCC_OXID',
),
);
}
/**
* @throws DBALException
* @throws DatabaseConnectionException
* @throws DatabaseErrorException
* @throws StandardException
* @throws d3ShopCompatibilityAdapterException
* @throws d3_cfg_mod_exception
*/
public function export()
{
/** @var d3_translations $oTranslation */
$oTranslation = oxNew(d3_translations::class);
$this->_sExportType = Registry::getRequest()->getRequestEscapedParameter('exporttype');
if ($this->getExportType() == 'csv') {
$oTranslation->exportCSV();
} elseif ($this->getExportType() == 'oxid') {
$oTranslation->exportOxid();
}
}
/**
* @return string
*/
public function getExportType()
{
return $this->_sExportType;
}
/**
* @throws DBALException
*/
public function import()
{
/** @var d3_translations $oTranslation */
$oTranslation = oxNew(d3_translations::class);
$oTranslation->setController($this);
header("Content-Type: text/html; charset=UTF-8");
$this->_sImportType = Registry::getRequest()->getRequestEscapedParameter('type');
try {
if ($this->getImportType() == 'csv') {
$this->_sMimeType = $_FILES['file']['type']['csv'];
$iImport = $oTranslation->importCSV();
$this->addTplParam('clrTmp', $iImport);
} elseif ($this->getImportType() == 'oxid') {
$this->_sMimeType = $_FILES['file']['type']['oxid'];
$iImport = $oTranslation->importOxid();
$this->addTplParam('clrTmp', $iImport);
} elseif ($this->getImportType() == 'installed') {
$iImport = $oTranslation->importInstalled();
$this->addTplParam('clrTmp', $iImport);
}
} catch (StandardException $e) {
Registry::getUtilsView()->addErrorToDisplay($e->getMessage());
}
}
/**
* @return string
*/
public function getImportType()
{
return $this->_sImportType;
}
/**
* @return null|string
* @throws DBALException
* @throws DatabaseConnectionException
* @throws DatabaseErrorException
*/
public function getMimeType()
{
if ($this->_sMimeType && $this->d3getSet()->getValue('blMultilang_OutputMimeType')) {
return $this->_sMimeType;
}
return null;
}
/**
* @throws DBALException
* @throws DatabaseConnectionException
* @throws DatabaseErrorException
* @throws d3ShopCompatibilityAdapterException
* @throws d3_cfg_mod_exception
* @throws StandardException
*/
public function clearLangCache()
{
/** @var d3clrtmp $oClrTmp */
$oClrTmp = oxNew(d3clrtmp::class);
if ($oClrTmp->clearLangCache()) {
$this->addStatusMessage(Registry::getLang()->translateString('D3_CFG_CLRTMP_SUCCESS'));
}
}
/**
* @return d3_cfg_mod
* @throws DBALException
* @throws DatabaseConnectionException
* @throws DatabaseErrorException
*/
public function d3getSet()
{
return d3_cfg_mod::get($this->_sModId);
}
}

View File

@ -1,31 +1,31 @@
<?php
namespace D3\Multilang\Application\Controller\Admin;
use D3\ModCfg\Application\Controller\Admin\d3_cfg_mod_licence;
use D3\ModCfg\Application\Model\Log\d3log;
/**
* This Software is the property of Data Development and is protected
* by copyright law - it is NOT Freeware.
* Any unauthorized use of this software without a valid license
* is a violation of the license agreement and will be prosecuted by
* civil and criminal law.
* http://www.shopmodule.com
*
* @copyright (C) D3 Data Development (Inh. Thomas Dartsch)
* @author D3 Data Development - Daniel Seifert <support@shopmodule.com>
* @link http://www.oxidmodule.com
*/
class d3_cfg_multilang_licence extends d3_cfg_mod_licence
{
protected $_sModId = 'd3_multilang';
protected $_hasNewsletterForm = false;
protected $_sLogType = d3log::ERROR;
protected $_sMenuItemTitle = 'd3mxmultilang';
protected $_sMenuSubItemTitle = 'd3tbcllib_support';
}
<?php
namespace D3\Multilang\Application\Controller\Admin;
use D3\ModCfg\Application\Controller\Admin\d3_cfg_mod_licence;
use D3\ModCfg\Application\Model\Log\d3log;
/**
* This Software is the property of Data Development and is protected
* by copyright law - it is NOT Freeware.
* Any unauthorized use of this software without a valid license
* is a violation of the license agreement and will be prosecuted by
* civil and criminal law.
* http://www.shopmodule.com
*
* @copyright (C) D3 Data Development (Inh. Thomas Dartsch)
* @author D3 Data Development - Daniel Seifert <support@shopmodule.com>
* @link http://www.oxidmodule.com
*/
class d3_cfg_multilang_licence extends d3_cfg_mod_licence
{
protected $_sModId = 'd3_multilang';
protected $_hasNewsletterForm = false;
protected $_sLogType = d3log::ERROR;
protected $_sMenuItemTitle = 'd3mxmultilang';
protected $_sMenuSubItemTitle = 'd3tbcllib_support';
}

View File

@ -1,39 +1,39 @@
<?php
namespace D3\Multilang\Application\Controller\Admin;
use D3\ModCfg\Application\Controller\Admin\d3_cfg_mod_list;
/**
* This Software is the property of Data Development and is protected
* by copyright law - it is NOT Freeware.
* Any unauthorized use of this software without a valid license
* is a violation of the license agreement and will be prosecuted by
* civil and criminal law.
* http://www.shopmodule.com
*
* @copyright (C) D3 Data Development (Inh. Thomas Dartsch)
* @author D3 Data Development - Daniel Seifert <support@shopmodule.com>
* @link http://www.oxidmodule.com
*/
class d3_cfg_multilang_list extends d3_cfg_mod_list
{
protected $_blD3ShowLangSwitch = false;
protected $_sMenuItemTitle = 'd3mxmultilang';
protected $_sMenuSubItemTitle = 'd3mxmultilang_settings';
/**
* @return null
*/
public function render()
{
$sRet = parent::render();
$this->addTplParam("default_edit", "d3_cfg_multilang_imex");
return $sRet;
}
<?php
namespace D3\Multilang\Application\Controller\Admin;
use D3\ModCfg\Application\Controller\Admin\d3_cfg_mod_list;
/**
* This Software is the property of Data Development and is protected
* by copyright law - it is NOT Freeware.
* Any unauthorized use of this software without a valid license
* is a violation of the license agreement and will be prosecuted by
* civil and criminal law.
* http://www.shopmodule.com
*
* @copyright (C) D3 Data Development (Inh. Thomas Dartsch)
* @author D3 Data Development - Daniel Seifert <support@shopmodule.com>
* @link http://www.oxidmodule.com
*/
class d3_cfg_multilang_list extends d3_cfg_mod_list
{
protected $_blD3ShowLangSwitch = false;
protected $_sMenuItemTitle = 'd3mxmultilang';
protected $_sMenuSubItemTitle = 'd3mxmultilang_settings';
/**
* @return null
*/
public function render()
{
$sRet = parent::render();
$this->addTplParam("default_edit", "d3_cfg_multilang_imex");
return $sRet;
}
}

View File

@ -1,217 +1,217 @@
<?php
namespace D3\Multilang\Application\Controller\Admin;
use D3\ModCfg\Application\Controller\Admin\d3_cfg_mod_main;
use D3\ModCfg\Application\Model\d3pagenavigation;
use D3\ModCfg\Application\Model\Exception\d3_cfg_mod_exception;
use D3\ModCfg\Application\Model\Exception\d3ShopCompatibilityAdapterException;
use D3\ModCfg\Application\Model\Maintenance\d3clrtmp;
use D3\Multilang\Application\Model\d3_translations;
use Doctrine\DBAL\DBALException;
use OxidEsales\Eshop\Core\DatabaseProvider;
use OxidEsales\Eshop\Core\Exception\DatabaseConnectionException;
use OxidEsales\Eshop\Core\Exception\DatabaseErrorException;
use OxidEsales\Eshop\Core\Exception\StandardException;
use OxidEsales\Eshop\Core\Registry;
use OxidEsales\Eshop\Core\UtilsView;
use stdClass;
/**
* This Software is the property of Data Development and is protected
* by copyright law - it is NOT Freeware.
* Any unauthorized use of this software without a valid license
* is a violation of the license agreement and will be prosecuted by
* civil and criminal law.
* http://www.shopmodule.com
*
* @copyright (C) D3 Data Development (Inh. Thomas Dartsch)
* @author D3 Data Development - Daniel Seifert <support@shopmodule.com>
* @link http://www.oxidmodule.com
*/
class d3_cfg_multilang_main extends d3_cfg_mod_main
{
protected $_sThisTemplate = 'd3_cfg_multilang_main.tpl';
protected $_iListSize = 0;
protected $_iCurrListPos = 0;
/** @var d3pagenavigation $_oPageNavigation */
protected $_oPageNavigation;
protected $_sModId = 'd3_multilang';
public $iAdminListSize = 20;
public $sSearchText;
public $sSearchType;
public $sItemType;
public $iLangsel_left;
public $iLangsel_right;
public $aLangSel = array();
protected $_sMenuItemTitle = 'd3mxmultilang';
protected $_sMenuSubItemTitle = 'd3tbclmultilang_translations';
/**
* @return string
* @throws d3ShopCompatibilityAdapterException
* @throws d3_cfg_mod_exception
* @throws DBALException
* @throws DatabaseConnectionException
* @throws DatabaseErrorException
* @throws StandardException
*/
public function render()
{
$sRet = parent::render();
$this->addTplParam('readonly', !$this->d3getSet()->isActive());
DatabaseProvider::getDb()->Execute("SET NAMES 'utf8'");
/** @var d3_translations $oTranslation */
$oTranslation = oxNew(d3_translations::class);
$this->iAdminListSize = 20;
$iLangOk = 0;
$this->sSearchText = Registry::getRequest()->getRequestEscapedParameter('sSearchText');
$this->sSearchType = Registry::getRequest()->getRequestEscapedParameter('sSearchType');
$this->sItemType = Registry::getRequest()->getRequestEscapedParameter('itemtype');
$this->addTplParam('sItemtype', $this->sItemType);
if ($this->sSearchText) {
$this->addTplParam('sSearchText', $this->sSearchText);
$this->addTplParam('sSearchType', $this->sSearchType);
$this->addTplParam('whereparam', "&amp;sSearchText=" . $this->sSearchText);
}
if (Registry::getSession()->getVariable('langsel_left') !== false
&& Registry::getSession()->getVariable('langsel_left') != ''
) {
$this->iLangsel_left = Registry::getSession()->getVariable('langsel_left');
$this->addTplParam('langsel_left', $this->iLangsel_left);
$iLangOk++;
} elseif ($this->iLangsel_left !== false && $this->iLangsel_left != '') {
$this->addTplParam('langsel_left', $this->iLangsel_left);
$iLangOk++;
} else {
$this->addTplParam('langsel_left', 'none');
}
if (Registry::getSession()->getVariable('langsel_right') !== false
&& Registry::getSession()->getVariable('langsel_right') != ''
) {
$this->iLangsel_right = Registry::getSession()->getVariable('langsel_right');
$this->addTplParam('langsel_right', $this->iLangsel_right);
$iLangOk++;
} elseif ($this->iLangsel_right !== false && $this->iLangsel_right != '') {
$this->addTplParam('langsel_right', $this->iLangsel_right);
$iLangOk++;
} else {
$this->addTplParam('langsel_right', 'none');
}
// ToDo: Suche mit in Anzahl aufnehmen
$oTranslation->setSearchFilter(
$this->iLangsel_left,
$this->iLangsel_right,
$this->sSearchText,
$this->sSearchType,
$this->sItemType
);
$this->_iListSize = $oTranslation->getItemCount();
/** @var d3pagenavigation _oPageNavigation */
$this->_oPageNavigation = oxNew(d3pagenavigation::class, $this->_iListSize, $this->iAdminListSize);
$this->_oPageNavigation->addUrlParam('sSearchText', $this->sSearchText);
$this->_oPageNavigation->addUrlParam('sSearchType', $this->sSearchType);
$this->_oPageNavigation->generate();
$this->_iCurrListPos = $this->_oPageNavigation->getCurrentItem();
$this->addTplParam('d3pagenavi', $this->_oPageNavigation);
$this->addTplParam('iPage', $this->_oPageNavigation->getCurrentPage());
$this->addTplParam('aLanguages', Registry::getLang()->getlanguageArray());
if ($iLangOk == 2) {
$aTranslList = $oTranslation->getTranslationArray(
false,
true,
true,
$this->_iCurrListPos - 1,
$this->iAdminListSize
);
$aTranslations = array();
if (is_array($aTranslList[$this->iLangsel_left]) && count($aTranslList[$this->iLangsel_left])) {
foreach ($aTranslList[$this->iLangsel_left] as $sIdent => $sTranslation) {
$oTranslation = new stdClass;
$oTranslation->key = $aTranslList['OXID'][$sIdent];
$oTranslation->left = htmlentities($sTranslation, ENT_COMPAT, 'UTF-8');
$oTranslation->right = htmlentities($aTranslList[$this->iLangsel_right][$sIdent], ENT_COMPAT, 'UTF-8');
$oTranslation->original_left = $aTranslList['orig_'.$this->iLangsel_left][$sIdent];
$oTranslation->original_right = $aTranslList['orig_'.$this->iLangsel_right][$sIdent];
$aTranslations[$sIdent] = $oTranslation;
}
}
$this->addTplParam('aTranslations', $aTranslations);
}
$this->addTplParam('listsize', $this->_iListSize);
return $sRet;
}
public function languageselect()
{
$this->aLangSel = Registry::getRequest()->getRequestEscapedParameter('langsel');
if ($this->aLangSel['left'] !== false && $this->aLangSel['left'] != '') {
Registry::getSession()->setVariable('langsel_left', $this->aLangSel['left']);
}
if ($this->aLangSel['right'] !== false && $this->aLangSel['right'] != '') {
Registry::getSession()->setVariable('langsel_right', $this->aLangSel['right']);
}
}
public function save()
{
$this->addTplParam('msg', 'success');
/** @var d3_translations $oTranslation */
$oTranslation = oxNew(d3_translations::class);
$oTranslation->saveItemList();
}
/**
* @throws DBALException
* @throws DatabaseConnectionException
* @throws DatabaseErrorException
* @throws StandardException
* @throws d3ShopCompatibilityAdapterException
* @throws d3_cfg_mod_exception
*/
public function clearLangCache()
{
/** @var d3clrtmp $oClrTmp */
$oClrTmp = oxNew(d3clrtmp::class);
if ($oClrTmp->clearLangCache()) {
Registry::get(UtilsView::class)->addErrorToDisplay('D3_CFG_CLRTMP_SUCCESS');
}
}
/**
* @throws DBALException
* @throws DatabaseConnectionException
* @throws DatabaseErrorException
* @throws StandardException
* @throws d3ShopCompatibilityAdapterException
* @throws d3_cfg_mod_exception
*/
public function deleteentry()
{
/** @var d3_translations $oTranslation */
$oTranslation = oxNew(d3_translations::class);
$sIdent = Registry::getRequest()->getRequestEscapedParameter('deloxid');
$oTranslation->delete($sIdent);
}
}
<?php
namespace D3\Multilang\Application\Controller\Admin;
use D3\ModCfg\Application\Controller\Admin\d3_cfg_mod_main;
use D3\ModCfg\Application\Model\d3pagenavigation;
use D3\ModCfg\Application\Model\Exception\d3_cfg_mod_exception;
use D3\ModCfg\Application\Model\Exception\d3ShopCompatibilityAdapterException;
use D3\ModCfg\Application\Model\Maintenance\d3clrtmp;
use D3\Multilang\Application\Model\d3_translations;
use Doctrine\DBAL\DBALException;
use OxidEsales\Eshop\Core\DatabaseProvider;
use OxidEsales\Eshop\Core\Exception\DatabaseConnectionException;
use OxidEsales\Eshop\Core\Exception\DatabaseErrorException;
use OxidEsales\Eshop\Core\Exception\StandardException;
use OxidEsales\Eshop\Core\Registry;
use OxidEsales\Eshop\Core\UtilsView;
use stdClass;
/**
* This Software is the property of Data Development and is protected
* by copyright law - it is NOT Freeware.
* Any unauthorized use of this software without a valid license
* is a violation of the license agreement and will be prosecuted by
* civil and criminal law.
* http://www.shopmodule.com
*
* @copyright (C) D3 Data Development (Inh. Thomas Dartsch)
* @author D3 Data Development - Daniel Seifert <support@shopmodule.com>
* @link http://www.oxidmodule.com
*/
class d3_cfg_multilang_main extends d3_cfg_mod_main
{
protected $_sThisTemplate = 'd3_cfg_multilang_main.tpl';
protected $_iListSize = 0;
protected $_iCurrListPos = 0;
/** @var d3pagenavigation $_oPageNavigation */
protected $_oPageNavigation;
protected $_sModId = 'd3_multilang';
public $iAdminListSize = 20;
public $sSearchText;
public $sSearchType;
public $sItemType;
public $iLangsel_left;
public $iLangsel_right;
public $aLangSel = array();
protected $_sMenuItemTitle = 'd3mxmultilang';
protected $_sMenuSubItemTitle = 'd3tbclmultilang_translations';
/**
* @return string
* @throws d3ShopCompatibilityAdapterException
* @throws d3_cfg_mod_exception
* @throws DBALException
* @throws DatabaseConnectionException
* @throws DatabaseErrorException
* @throws StandardException
*/
public function render()
{
$sRet = parent::render();
$this->addTplParam('readonly', !$this->d3getSet()->isActive());
DatabaseProvider::getDb()->Execute("SET NAMES 'utf8'");
/** @var d3_translations $oTranslation */
$oTranslation = oxNew(d3_translations::class);
$this->iAdminListSize = 20;
$iLangOk = 0;
$this->sSearchText = Registry::getRequest()->getRequestEscapedParameter('sSearchText');
$this->sSearchType = Registry::getRequest()->getRequestEscapedParameter('sSearchType');
$this->sItemType = Registry::getRequest()->getRequestEscapedParameter('itemtype');
$this->addTplParam('sItemtype', $this->sItemType);
if ($this->sSearchText) {
$this->addTplParam('sSearchText', $this->sSearchText);
$this->addTplParam('sSearchType', $this->sSearchType);
$this->addTplParam('whereparam', "&amp;sSearchText=" . $this->sSearchText);
}
if (Registry::getSession()->getVariable('langsel_left') !== false
&& Registry::getSession()->getVariable('langsel_left') != ''
) {
$this->iLangsel_left = Registry::getSession()->getVariable('langsel_left');
$this->addTplParam('langsel_left', $this->iLangsel_left);
$iLangOk++;
} elseif ($this->iLangsel_left !== false && $this->iLangsel_left != '') {
$this->addTplParam('langsel_left', $this->iLangsel_left);
$iLangOk++;
} else {
$this->addTplParam('langsel_left', 'none');
}
if (Registry::getSession()->getVariable('langsel_right') !== false
&& Registry::getSession()->getVariable('langsel_right') != ''
) {
$this->iLangsel_right = Registry::getSession()->getVariable('langsel_right');
$this->addTplParam('langsel_right', $this->iLangsel_right);
$iLangOk++;
} elseif ($this->iLangsel_right !== false && $this->iLangsel_right != '') {
$this->addTplParam('langsel_right', $this->iLangsel_right);
$iLangOk++;
} else {
$this->addTplParam('langsel_right', 'none');
}
// ToDo: Suche mit in Anzahl aufnehmen
$oTranslation->setSearchFilter(
$this->iLangsel_left,
$this->iLangsel_right,
$this->sSearchText,
$this->sSearchType,
$this->sItemType
);
$this->_iListSize = $oTranslation->getItemCount();
/** @var d3pagenavigation _oPageNavigation */
$this->_oPageNavigation = oxNew(d3pagenavigation::class, $this->_iListSize, $this->iAdminListSize);
$this->_oPageNavigation->addUrlParam('sSearchText', $this->sSearchText);
$this->_oPageNavigation->addUrlParam('sSearchType', $this->sSearchType);
$this->_oPageNavigation->generate();
$this->_iCurrListPos = $this->_oPageNavigation->getCurrentItem();
$this->addTplParam('d3pagenavi', $this->_oPageNavigation);
$this->addTplParam('iPage', $this->_oPageNavigation->getCurrentPage());
$this->addTplParam('aLanguages', Registry::getLang()->getlanguageArray());
if ($iLangOk == 2) {
$aTranslList = $oTranslation->getTranslationArray(
false,
true,
true,
$this->_iCurrListPos - 1,
$this->iAdminListSize
);
$aTranslations = array();
if (is_array($aTranslList[$this->iLangsel_left]) && count($aTranslList[$this->iLangsel_left])) {
foreach ($aTranslList[$this->iLangsel_left] as $sIdent => $sTranslation) {
$oTranslation = new stdClass;
$oTranslation->key = $aTranslList['OXID'][$sIdent];
$oTranslation->left = htmlentities($sTranslation, ENT_COMPAT, 'UTF-8');
$oTranslation->right = htmlentities($aTranslList[$this->iLangsel_right][$sIdent], ENT_COMPAT, 'UTF-8');
$oTranslation->original_left = $aTranslList['orig_'.$this->iLangsel_left][$sIdent];
$oTranslation->original_right = $aTranslList['orig_'.$this->iLangsel_right][$sIdent];
$aTranslations[$sIdent] = $oTranslation;
}
}
$this->addTplParam('aTranslations', $aTranslations);
}
$this->addTplParam('listsize', $this->_iListSize);
return $sRet;
}
public function languageselect()
{
$this->aLangSel = Registry::getRequest()->getRequestEscapedParameter('langsel');
if ($this->aLangSel['left'] !== false && $this->aLangSel['left'] != '') {
Registry::getSession()->setVariable('langsel_left', $this->aLangSel['left']);
}
if ($this->aLangSel['right'] !== false && $this->aLangSel['right'] != '') {
Registry::getSession()->setVariable('langsel_right', $this->aLangSel['right']);
}
}
public function save()
{
$this->addTplParam('msg', 'success');
/** @var d3_translations $oTranslation */
$oTranslation = oxNew(d3_translations::class);
$oTranslation->saveItemList();
}
/**
* @throws DBALException
* @throws DatabaseConnectionException
* @throws DatabaseErrorException
* @throws StandardException
* @throws d3ShopCompatibilityAdapterException
* @throws d3_cfg_mod_exception
*/
public function clearLangCache()
{
/** @var d3clrtmp $oClrTmp */
$oClrTmp = oxNew(d3clrtmp::class);
if ($oClrTmp->clearLangCache()) {
Registry::get(UtilsView::class)->addErrorToDisplay('D3_CFG_CLRTMP_SUCCESS');
}
}
/**
* @throws DBALException
* @throws DatabaseConnectionException
* @throws DatabaseErrorException
* @throws StandardException
* @throws d3ShopCompatibilityAdapterException
* @throws d3_cfg_mod_exception
*/
public function deleteentry()
{
/** @var d3_translations $oTranslation */
$oTranslation = oxNew(d3_translations::class);
$sIdent = Registry::getRequest()->getRequestEscapedParameter('deloxid');
$oTranslation->delete($sIdent);
}
}

View File

@ -1,11 +1,11 @@
[{$smarty.block.parent}]
<tr>
<td class="edittext" valign="top">
<label for="importmultilang">[{oxmultilang ident="D3_MULTILANG_CLEARTMP_IMPORT"}]</label>
</td>
<td class="edittext" style="vertical-align: top;">
<input type="hidden" name="importmultilang" value="0">
<input onClick="deselect_combineditem();" type="checkbox" id="importmultilang" value="1" class="edittext" name="importmultilang" [{if $importMultilang}]checked[{/if}][{$readonly}] [{if $blDevMode}]disabled [{/if}]>
</td>
[{$smarty.block.parent}]
<tr>
<td class="edittext" valign="top">
<label for="importmultilang">[{oxmultilang ident="D3_MULTILANG_CLEARTMP_IMPORT"}]</label>
</td>
<td class="edittext" style="vertical-align: top;">
<input type="hidden" name="importmultilang" value="0">
<input onClick="deselect_combineditem();" type="checkbox" id="importmultilang" value="1" class="edittext" name="importmultilang" [{if $importMultilang}]checked[{/if}][{$readonly}] [{if $blDevMode}]disabled [{/if}]>
</td>
</tr>

View File

@ -1,2 +1,2 @@
[{$smarty.block.parent}]
[{$smarty.block.parent}]
document.getElementById('importmultilang').checked = false;

View File

@ -1,94 +1,94 @@
<?php
/**
* This Software is the property of Data Development and is protected
* by copyright law - it is NOT Freeware.
* Any unauthorized use of this software without a valid license
* is a violation of the license agreement and will be prosecuted by
* civil and criminal law.
* http://www.shopmodule.com
*
* @copyright (C) D3 Data Development (Inh. Thomas Dartsch)
* @author D3 Data Development - Daniel Seifert <support@shopmodule.com>
* @link http://www.oxidmodule.com
*/
$sLangName = 'Deutsch';
// -------------------------------
// RESOURCE IDENTITFIER = STRING
// -------------------------------
$aLang = array(
'charset' => 'UTF-8',
'd3mxmultilang' => '<i class=\'fa fa-comments\'></i> Übersetzungsassistent',
'd3mxmultilang_settings' => 'Einstellungen',
'd3tbclmultilang_translations' => 'Übersetzungen',
'd3tbclmultilang_imex' => 'Import / Export',
'D3_MULTILANG_TRANSL' => 'Übersetzungsassistent',
'D3_MULTILANG_METADATA_TITLE' => 'D³ Übersetzungsassistent',
'D3_MULTILANG_METADATA_DESC' => 'Verwalten Sie die Textbausteine des Shop bequem im Adminbereich',
'D3_MULTILANG_SEARCH' => 'Suche',
'D3_MULTILANG_SEARCH_FURTHER' => 'weitere Suchoptionen',
'D3_MULTILANG_CHOOSELANGFIRST' => 'Bitte wählen Sie zuerst die beiden Sprachen.',
'D3_MULTILANG_SEARCHDESC' => 'Suche in den gewählten Sprachen<br>und den Idents:',
'D3_MULTILANG_SEARCHSTART' => 'Suche starten',
'D3_MULTILANG_SEARCHEMPTYSTART' => 'suche leere Einträge',
'D3_MULTILANG_SEARCHIDENTICALSTART' => 'suche identische Einträge',
'D3_MULTILANG_SEARCHORIGINALSTART' => 'suche originale Einträge',
'D3_MULTILANG_SEARCHALL' => 'alle Einträge anzeigen',
'D3_MULTILANG_SEARCHFRONTEND' => 'nur Frontend-Einträge',
'D3_MULTILANG_SEARCHBACKEND' => 'nur Backend-Einträge',
'D3_MULTILANG_LANGSELECT' => 'Sprachwahl',
'D3_MULTILANG_SELECTLANGUAGE' => 'Sprache wählen',
'D3_MULTILANG_NEWITEM' => 'Neueinträge',
'D3_MULTILANG_SAVE' => 'Speichern',
'D3_MULTILANG_EXPORT' => 'Export',
'D3_MULTILANG_FILETYPECSV' => 'CSV-Datei',
'D3_MULTILANG_FILETYPEOXID' => 'Oxid eShop Format',
'D3_MULTILANG_FILETYPEINSTALLED' => 'installierte Sprachbausteindateien',
'D3_MULTILANG_STARTEXPORT' => 'Export starten',
'D3_MULTILANG_IMPORT' => 'Import',
'D3_MULTILANG_IMPORTSTARTCSV' => 'CSV-Datei importieren',
'D3_MULTILANG_IMPORTSTARTOXID' => 'Oxid-Datei importieren',
'D3_MULTILANG_IMPORTSTARTINSTALLED' => 'installierte Dateien importieren',
'D3_MULTILANG_IMPORTOXIDLANG' => 'einfügen in Sprache',
'D3_MULTILANG_IMPORTOVERWRITE' => 'Alteinträge überschreiben',
'D3_MULTILANG_SETORIGINAL' => 'Importe sind Originaleinträge',
'D3_MULTILANG_IGNOREMIME' => 'Dateiformatprüfung ignorieren',
'D3_MULTILANG_IGNOREMIME_DESC' => 'Um Importfehler zu vermeiden, wird das Format der Importdatei überprüft. In manchen Fällen kann es vorkommen, dass das Format passt, jedoch nicht geprüft werden kann. Stellen Sie dann sicher, dass Ihre Importdatei passend ist und aktivieren Sie diese Option.',
'D3_MULTILANG_ISADMIN' => 'Importe sind Einträge des Adminbereichs',
'D3_MULTILANG_SUCC_CSV' => '%d Einträge aus CSV-Datei importiert. Bitte leeren Sie das TMP-Verzeichnis.',
'D3_MULTILANG_ERR_CSV_MIME' => '%d Einträge aus CSV-Datei importiert. Dateiformat kann nicht geprüft werden.',
'D3_MULTILANG_SUCC_OXID' => '%d Einträge aus Oxid-Datei importiert. Bitte leeren Sie das TMP-Verzeichnis.',
'D3_MULTILANG_ERR_OXID_MIME' => '%d Einträge aus Oxid-Datei importiert. Dateiformat kann nicht geprüft werden.',
'D3_MULTILANG_SUCC_INSTALLED' => '%d Einträge aus installierten Dateien importiert. Bitte leeren Sie das TMP-Verzeichnis.',
'D3_MULTILANG_SUCCEXP' => 'exportiert nach: %s',
'D3_MULTILANG_DEMOEXP' => 'Im Demomodus des Moduls steht der Export leider nicht zur Verfügung.',
'D3_MULTILANG_MODCFG_SAVEMISS' => 'fehlende Sprachbausteine werden automatisch angelegt',
'D3_MULTILANG_MODCFG_TRIMWHITESPACES' => 'entferne Leerzeichen am Anfang und Ende der Sprachbausteine',
'D3_MULTILANG_MODCFG_ADDMAPPEDTRANSLATIONS' => 'Mapping-Einträge als eigenständige Sprachbausteine importieren',
'D3_MULTILANG_MODCFG_ADDMAPPEDTRANSLATIONS_DESC' => 'Die bisherigen weitergeleiteten Spracheinträge werden als eigenständige Übersetzungen in die Datenbank aufgenommen. Diese können nun (unabhängig von Ihrem Elterneintrag) geändert werden. Ohne diese Option werden diese Mapping-Einträge ignoriert.',
'D3_MULTILANG_MODCFG_MIME' => 'Import: erkannten Dateityp ausgeben (debug)',
'D3_MULTILANG_MODCFG_SEPARATOR' => 'zu verwendender CSV-Feldtrenner',
'D3_MULTILANG_MODCFG_ENCLOSER' => 'zu verwendendes Textbegrenzungszeichen',
'D3_MULTILANG_SETTINGS' => 'Grundeinstellungen',
'D3_MULTILANG_CLEARLANGCACHE' => 'Zum Aktivieren der neuen Sprachvariablen ist ist das Leeren des Sprach-Caches nötig. Soll dies jetzt durchgeführt werden?',
'D3_MULTILANG_NEWFIELDERROR' => 'Die markierten Einträge konnten nicht eingefügt werden, da der Ident schon verwendet wird.',
'D3_MULTILANG_SUCC_COUNT' => ' Einträge - ',
'D3_MULTILANG_XLS_CREATOR' => 'D³ Übersetzungsassistent Modul für Oxid eShop',
'D3_MULTILANG_XLS_TITLE' => 'Übersetzungen',
'D3_MULTILANG_XLS_LOCALEERR' => 'Kann Spracheinstellungen "%s" nicht setzen - Einstellung ist "en_us"',
'D3_MULTILANG_XLS_LANG' => 'Sprache',
'D3_MULTILANG_CLEARTMP_IMPORT' => '<img src="../modules/d3/modcfg/public/d3logo.php" alt="D³" title="D³ Data Development"> <b>Übersetzungsassistent</b>: Sprachbausteine vorher importieren',
'D3_MULTILANG_INSTALL_EXECIMPORT' => 'Vor der Verwendung des Moduls ist es erforderlich, die verwendeten Sprachbausteine zu importieren. Lassen Sie dies im Installationsprozess automatisch durchführen oder starten Sie den Import vor der Modulaktivierung im Adminbereich Ihres Shops.',
'D3_MULTILANG_INSTALL_IMPORTSUCC' => '%i Sprachbausteine aus vorhandenen Dateien importiert',
'D3_MULTILANG_INSTALL_NOCSCOLLATION' => 'Die Datenbank stellt keine case-sensitive Kollation für das Feld %1$s der Tabelle %2$s bereit. Bitte stellen Sie eine passende Kollation bereit und passen das Datenbankfeld darauf hin an. Bis dahin können keine gleichnamigen Idents mit unterschiedlicher Groß- und Kleinschreibung verwendet werden.',
'D3_MULTILANG_EXC_NOIMPORTFILE' => 'Es wurde keine Importdatei aufgeladen.'
);
<?php
/**
* This Software is the property of Data Development and is protected
* by copyright law - it is NOT Freeware.
* Any unauthorized use of this software without a valid license
* is a violation of the license agreement and will be prosecuted by
* civil and criminal law.
* http://www.shopmodule.com
*
* @copyright (C) D3 Data Development (Inh. Thomas Dartsch)
* @author D3 Data Development - Daniel Seifert <support@shopmodule.com>
* @link http://www.oxidmodule.com
*/
$sLangName = 'Deutsch';
// -------------------------------
// RESOURCE IDENTITFIER = STRING
// -------------------------------
$aLang = array(
'charset' => 'UTF-8',
'd3mxmultilang' => '<i class=\'fa fa-comments\'></i> Übersetzungsassistent',
'd3mxmultilang_settings' => 'Einstellungen',
'd3tbclmultilang_translations' => 'Übersetzungen',
'd3tbclmultilang_imex' => 'Import / Export',
'D3_MULTILANG_TRANSL' => 'Übersetzungsassistent',
'D3_MULTILANG_METADATA_TITLE' => 'D³ Übersetzungsassistent',
'D3_MULTILANG_METADATA_DESC' => 'Verwalten Sie die Textbausteine des Shop bequem im Adminbereich',
'D3_MULTILANG_SEARCH' => 'Suche',
'D3_MULTILANG_SEARCH_FURTHER' => 'weitere Suchoptionen',
'D3_MULTILANG_CHOOSELANGFIRST' => 'Bitte wählen Sie zuerst die beiden Sprachen.',
'D3_MULTILANG_SEARCHDESC' => 'Suche in den gewählten Sprachen<br>und den Idents:',
'D3_MULTILANG_SEARCHSTART' => 'Suche starten',
'D3_MULTILANG_SEARCHEMPTYSTART' => 'suche leere Einträge',
'D3_MULTILANG_SEARCHIDENTICALSTART' => 'suche identische Einträge',
'D3_MULTILANG_SEARCHORIGINALSTART' => 'suche originale Einträge',
'D3_MULTILANG_SEARCHALL' => 'alle Einträge anzeigen',
'D3_MULTILANG_SEARCHFRONTEND' => 'nur Frontend-Einträge',
'D3_MULTILANG_SEARCHBACKEND' => 'nur Backend-Einträge',
'D3_MULTILANG_LANGSELECT' => 'Sprachwahl',
'D3_MULTILANG_SELECTLANGUAGE' => 'Sprache wählen',
'D3_MULTILANG_NEWITEM' => 'Neueinträge',
'D3_MULTILANG_SAVE' => 'Speichern',
'D3_MULTILANG_EXPORT' => 'Export',
'D3_MULTILANG_FILETYPECSV' => 'CSV-Datei',
'D3_MULTILANG_FILETYPEOXID' => 'Oxid eShop Format',
'D3_MULTILANG_FILETYPEINSTALLED' => 'installierte Sprachbausteindateien',
'D3_MULTILANG_STARTEXPORT' => 'Export starten',
'D3_MULTILANG_IMPORT' => 'Import',
'D3_MULTILANG_IMPORTSTARTCSV' => 'CSV-Datei importieren',
'D3_MULTILANG_IMPORTSTARTOXID' => 'Oxid-Datei importieren',
'D3_MULTILANG_IMPORTSTARTINSTALLED' => 'installierte Dateien importieren',
'D3_MULTILANG_IMPORTOXIDLANG' => 'einfügen in Sprache',
'D3_MULTILANG_IMPORTOVERWRITE' => 'Alteinträge überschreiben',
'D3_MULTILANG_SETORIGINAL' => 'Importe sind Originaleinträge',
'D3_MULTILANG_IGNOREMIME' => 'Dateiformatprüfung ignorieren',
'D3_MULTILANG_IGNOREMIME_DESC' => 'Um Importfehler zu vermeiden, wird das Format der Importdatei überprüft. In manchen Fällen kann es vorkommen, dass das Format passt, jedoch nicht geprüft werden kann. Stellen Sie dann sicher, dass Ihre Importdatei passend ist und aktivieren Sie diese Option.',
'D3_MULTILANG_ISADMIN' => 'Importe sind Einträge des Adminbereichs',
'D3_MULTILANG_SUCC_CSV' => '%d Einträge aus CSV-Datei importiert. Bitte leeren Sie das TMP-Verzeichnis.',
'D3_MULTILANG_ERR_CSV_MIME' => '%d Einträge aus CSV-Datei importiert. Dateiformat kann nicht geprüft werden.',
'D3_MULTILANG_SUCC_OXID' => '%d Einträge aus Oxid-Datei importiert. Bitte leeren Sie das TMP-Verzeichnis.',
'D3_MULTILANG_ERR_OXID_MIME' => '%d Einträge aus Oxid-Datei importiert. Dateiformat kann nicht geprüft werden.',
'D3_MULTILANG_SUCC_INSTALLED' => '%d Einträge aus installierten Dateien importiert. Bitte leeren Sie das TMP-Verzeichnis.',
'D3_MULTILANG_SUCCEXP' => 'exportiert nach: %s',
'D3_MULTILANG_DEMOEXP' => 'Im Demomodus des Moduls steht der Export leider nicht zur Verfügung.',
'D3_MULTILANG_MODCFG_SAVEMISS' => 'fehlende Sprachbausteine werden automatisch angelegt',
'D3_MULTILANG_MODCFG_TRIMWHITESPACES' => 'entferne Leerzeichen am Anfang und Ende der Sprachbausteine',
'D3_MULTILANG_MODCFG_ADDMAPPEDTRANSLATIONS' => 'Mapping-Einträge als eigenständige Sprachbausteine importieren',
'D3_MULTILANG_MODCFG_ADDMAPPEDTRANSLATIONS_DESC' => 'Die bisherigen weitergeleiteten Spracheinträge werden als eigenständige Übersetzungen in die Datenbank aufgenommen. Diese können nun (unabhängig von Ihrem Elterneintrag) geändert werden. Ohne diese Option werden diese Mapping-Einträge ignoriert.',
'D3_MULTILANG_MODCFG_MIME' => 'Import: erkannten Dateityp ausgeben (debug)',
'D3_MULTILANG_MODCFG_SEPARATOR' => 'zu verwendender CSV-Feldtrenner',
'D3_MULTILANG_MODCFG_ENCLOSER' => 'zu verwendendes Textbegrenzungszeichen',
'D3_MULTILANG_SETTINGS' => 'Grundeinstellungen',
'D3_MULTILANG_CLEARLANGCACHE' => 'Zum Aktivieren der neuen Sprachvariablen ist ist das Leeren des Sprach-Caches nötig. Soll dies jetzt durchgeführt werden?',
'D3_MULTILANG_NEWFIELDERROR' => 'Die markierten Einträge konnten nicht eingefügt werden, da der Ident schon verwendet wird.',
'D3_MULTILANG_SUCC_COUNT' => ' Einträge - ',
'D3_MULTILANG_XLS_CREATOR' => 'D³ Übersetzungsassistent Modul für Oxid eShop',
'D3_MULTILANG_XLS_TITLE' => 'Übersetzungen',
'D3_MULTILANG_XLS_LOCALEERR' => 'Kann Spracheinstellungen "%s" nicht setzen - Einstellung ist "en_us"',
'D3_MULTILANG_XLS_LANG' => 'Sprache',
'D3_MULTILANG_CLEARTMP_IMPORT' => '<img src="../modules/d3/modcfg/public/d3logo.php" alt="D³" title="D³ Data Development"> <b>Übersetzungsassistent</b>: Sprachbausteine vorher importieren',
'D3_MULTILANG_INSTALL_EXECIMPORT' => 'Vor der Verwendung des Moduls ist es erforderlich, die verwendeten Sprachbausteine zu importieren. Lassen Sie dies im Installationsprozess automatisch durchführen oder starten Sie den Import vor der Modulaktivierung im Adminbereich Ihres Shops.',
'D3_MULTILANG_INSTALL_IMPORTSUCC' => '%i Sprachbausteine aus vorhandenen Dateien importiert',
'D3_MULTILANG_INSTALL_NOCSCOLLATION' => 'Die Datenbank stellt keine case-sensitive Kollation für das Feld %1$s der Tabelle %2$s bereit. Bitte stellen Sie eine passende Kollation bereit und passen das Datenbankfeld darauf hin an. Bis dahin können keine gleichnamigen Idents mit unterschiedlicher Groß- und Kleinschreibung verwendet werden.',
'D3_MULTILANG_EXC_NOIMPORTFILE' => 'Es wurde keine Importdatei aufgeladen.'
);

View File

@ -1,91 +1,91 @@
<?php
/**
* This Software is the property of Data Development and is protected
* by copyright law - it is NOT Freeware.
* Any unauthorized use of this software without a valid license
* is a violation of the license agreement and will be prosecuted by
* civil and criminal law.
* http://www.shopmodule.com
*
* @copyright (C) D3 Data Development (Inh. Thomas Dartsch)
* @author D3 Data Development - Daniel Seifert <support@shopmodule.com>
* @link http://www.oxidmodule.com
*/
$sLangName = 'Deutsch';
// -------------------------------
// RESOURCE IDENTITFIER = STRING
// -------------------------------
$aLang = array(
'charset' => 'UTF-8',
'd3mxmultilang' => '<i class=\'fa fa-comments\'></i> Translation Wizzard',
'd3mxmultilang_settings' => 'Settings',
'd3tbclmultilang_translations' => 'Translations',
'd3tbclmultilang_imex' => 'Import / Export',
'D3_MULTILANG_TRANSL' => 'Translation Wizzard',
'D3_MULTILANG_METADATA_TITLE' => 'D³ Translation Wizzard',
'D3_MULTILANG_METADATA_DESC' => 'Manage all shop multilang items comfortable in admin panel.',
'D3_MULTILANG_SEARCH' => 'search',
'D3_MULTILANG_CHOOSELANGFIRST' => 'Please choose both languages first.',
'D3_MULTILANG_SEARCHDESC' => 'Search in selected languages<br>and in idents:',
'D3_MULTILANG_SEARCHSTART' => 'start search',
'D3_MULTILANG_SEARCHEMPTYSTART' => 'search empty items',
'D3_MULTILANG_SEARCHIDENTICALSTART' => 'search identical items',
'D3_MULTILANG_SEARCHALL' => 'show all items',
'D3_MULTILANG_SEARCHFRONTEND' => 'show frontend items only',
'D3_MULTILANG_SEARCHBACKEND' => 'show backend items only',
'D3_MULTILANG_LANGSELECT' => 'language selection',
'D3_MULTILANG_SELECTLANGUAGE' => 'choose language',
'D3_MULTILANG_NEWITEM' => 'new items',
'D3_MULTILANG_SAVE' => 'save',
'D3_MULTILANG_EXPORT' => 'export',
'D3_MULTILANG_FILETYPECSV' => 'CSV file',
'D3_MULTILANG_FILETYPEOXID' => 'Oxid eShop Format',
'D3_MULTILANG_FILETYPEINSTALLED' => 'installed language item files',
'D3_MULTILANG_STARTEXPORT' => 'start export',
'D3_MULTILANG_IMPORT' => 'import',
'D3_MULTILANG_IMPORTSTARTCSV' => 'import CSV file',
'D3_MULTILANG_IMPORTSTARTOXID' => 'import Oxid file',
'D3_MULTILANG_IMPORTSTARTINSTALLED' => 'import installed language item files',
'D3_MULTILANG_IMPORTOXIDLANG' => 'insert in language',
'D3_MULTILANG_IMPORTOVERWRITE' => 'overwrite existing items',
'D3_MULTILANG_SETORIGINAL' => 'imported items are originals',
'D3_MULTILANG_IGNOREMIME' => 'ignore file format',
'D3_MULTILANG_IGNOREMIME_DESC' => 'To avoid import errors, the format of the import file is checked. In some cases, the format may fit, but it can not be verified. Then make sure that your import file is suitable and activate this option.',
'D3_MULTILANG_ISADMIN' => 'imported items are admin panel translations',
'D3_MULTILANG_SUCC_CSV' => '%d items from CSV file imported. Please clear the TMP folder.',
'D3_MULTILANG_ERR_CSV_MIME' => '%d items from CSV file imported. Can\'t check file format.',
'D3_MULTILANG_SUCC_OXID' => '%d items from OXID file imported. Please clear the TMP folder.',
'D3_MULTILANG_ERR_OXID_MIME' => '%d items from OXID file imported. Can\'t check file format.',
'D3_MULTILANG_SUCC_INSTALLED' => '%d items from installed language files imported. Please clear the TMP folder.',
'D3_MULTILANG_NOT_SUCC' => 'Wrong file format, import canceled. Please check the file.',
'D3_MULTILANG_SUCCEXP' => 'exported to: %s',
'D3_MULTILANG_DEMOEXP' => 'In the demo mode of the module, the export is unfortunately not available.',
'D3_MULTILANG_MODCFG_SAVEMISS' => 'missing language items were created automatically',
'D3_MULTILANG_MODCFG_TRIMWHITESPACES' => 'remove whitespaces at the beginning and the end of translated text',
'D3_MULTILANG_MODCFG_MIME' => 'Import: display found filetype (debug)',
'D3_MULTILANG_MODCFG_SEPARATOR' => 'CSV field separator',
'D3_MULTILANG_MODCFG_ENCLOSER' => 'text enclosure',
'D3_MULTILANG_SETTINGS' => 'base settings',
'D3_MULTILANG_CLEARLANGCACHE' => "To activate your new language items it's required, to clear the language cache in TMP folder. Do you want do this now?",
'D3_MULTILANG_NEWFIELDERROR' => "The marked items can't inserted, because the ident still exists.",
'D3_MULTILANG_SUCC_COUNT' => ' items - ',
'D3_MULTILANG_XLS_CREATOR' => 'D³ Translation Wizzard Module for Oxid eShop',
'D3_MULTILANG_XLS_TITLE' => 'translations',
'D3_MULTILANG_XLS_LOCALEERR' => 'Unable to set language setting "%s" - setting is "en_us"',
'D3_MULTILANG_XLS_LANG' => 'language',
'D3_MULTILANG_CLEARTMP_IMPORT' => '<img src="../modules/d3/modcfg/public/d3logo.php" alt="D³" title="D³ Data Development"> <b>Translation Wizzard</b>: import text items first',
'D3_MULTILANG_INSTALL_EXECIMPORT' => 'Before using the module, it is necessary to import the used test items. Have this done automatically in the installation process or start the import before activating the module in the admin area of your shop.',
'D3_MULTILANG_INSTALL_IMPORTSUCC' => '%i text items imported from existing files',
'D3_MULTILANG_INSTALL_NOCSCOLLATION' => 'The database does not provide a case-sensitive collation for the %1$s field of the %2$s table. Please provide a suitable collation and adjust the database field accordingly. Until then, you can not use identically named identifiers with different capitalization.',
'D3_MULTILANG_EXC_NOIMPORTFILE' => 'No import file was loaded.'
<?php
/**
* This Software is the property of Data Development and is protected
* by copyright law - it is NOT Freeware.
* Any unauthorized use of this software without a valid license
* is a violation of the license agreement and will be prosecuted by
* civil and criminal law.
* http://www.shopmodule.com
*
* @copyright (C) D3 Data Development (Inh. Thomas Dartsch)
* @author D3 Data Development - Daniel Seifert <support@shopmodule.com>
* @link http://www.oxidmodule.com
*/
$sLangName = 'Deutsch';
// -------------------------------
// RESOURCE IDENTITFIER = STRING
// -------------------------------
$aLang = array(
'charset' => 'UTF-8',
'd3mxmultilang' => '<i class=\'fa fa-comments\'></i> Translation Wizzard',
'd3mxmultilang_settings' => 'Settings',
'd3tbclmultilang_translations' => 'Translations',
'd3tbclmultilang_imex' => 'Import / Export',
'D3_MULTILANG_TRANSL' => 'Translation Wizzard',
'D3_MULTILANG_METADATA_TITLE' => 'D³ Translation Wizzard',
'D3_MULTILANG_METADATA_DESC' => 'Manage all shop multilang items comfortable in admin panel.',
'D3_MULTILANG_SEARCH' => 'search',
'D3_MULTILANG_CHOOSELANGFIRST' => 'Please choose both languages first.',
'D3_MULTILANG_SEARCHDESC' => 'Search in selected languages<br>and in idents:',
'D3_MULTILANG_SEARCHSTART' => 'start search',
'D3_MULTILANG_SEARCHEMPTYSTART' => 'search empty items',
'D3_MULTILANG_SEARCHIDENTICALSTART' => 'search identical items',
'D3_MULTILANG_SEARCHALL' => 'show all items',
'D3_MULTILANG_SEARCHFRONTEND' => 'show frontend items only',
'D3_MULTILANG_SEARCHBACKEND' => 'show backend items only',
'D3_MULTILANG_LANGSELECT' => 'language selection',
'D3_MULTILANG_SELECTLANGUAGE' => 'choose language',
'D3_MULTILANG_NEWITEM' => 'new items',
'D3_MULTILANG_SAVE' => 'save',
'D3_MULTILANG_EXPORT' => 'export',
'D3_MULTILANG_FILETYPECSV' => 'CSV file',
'D3_MULTILANG_FILETYPEOXID' => 'Oxid eShop Format',
'D3_MULTILANG_FILETYPEINSTALLED' => 'installed language item files',
'D3_MULTILANG_STARTEXPORT' => 'start export',
'D3_MULTILANG_IMPORT' => 'import',
'D3_MULTILANG_IMPORTSTARTCSV' => 'import CSV file',
'D3_MULTILANG_IMPORTSTARTOXID' => 'import Oxid file',
'D3_MULTILANG_IMPORTSTARTINSTALLED' => 'import installed language item files',
'D3_MULTILANG_IMPORTOXIDLANG' => 'insert in language',
'D3_MULTILANG_IMPORTOVERWRITE' => 'overwrite existing items',
'D3_MULTILANG_SETORIGINAL' => 'imported items are originals',
'D3_MULTILANG_IGNOREMIME' => 'ignore file format',
'D3_MULTILANG_IGNOREMIME_DESC' => 'To avoid import errors, the format of the import file is checked. In some cases, the format may fit, but it can not be verified. Then make sure that your import file is suitable and activate this option.',
'D3_MULTILANG_ISADMIN' => 'imported items are admin panel translations',
'D3_MULTILANG_SUCC_CSV' => '%d items from CSV file imported. Please clear the TMP folder.',
'D3_MULTILANG_ERR_CSV_MIME' => '%d items from CSV file imported. Can\'t check file format.',
'D3_MULTILANG_SUCC_OXID' => '%d items from OXID file imported. Please clear the TMP folder.',
'D3_MULTILANG_ERR_OXID_MIME' => '%d items from OXID file imported. Can\'t check file format.',
'D3_MULTILANG_SUCC_INSTALLED' => '%d items from installed language files imported. Please clear the TMP folder.',
'D3_MULTILANG_NOT_SUCC' => 'Wrong file format, import canceled. Please check the file.',
'D3_MULTILANG_SUCCEXP' => 'exported to: %s',
'D3_MULTILANG_DEMOEXP' => 'In the demo mode of the module, the export is unfortunately not available.',
'D3_MULTILANG_MODCFG_SAVEMISS' => 'missing language items were created automatically',
'D3_MULTILANG_MODCFG_TRIMWHITESPACES' => 'remove whitespaces at the beginning and the end of translated text',
'D3_MULTILANG_MODCFG_MIME' => 'Import: display found filetype (debug)',
'D3_MULTILANG_MODCFG_SEPARATOR' => 'CSV field separator',
'D3_MULTILANG_MODCFG_ENCLOSER' => 'text enclosure',
'D3_MULTILANG_SETTINGS' => 'base settings',
'D3_MULTILANG_CLEARLANGCACHE' => "To activate your new language items it's required, to clear the language cache in TMP folder. Do you want do this now?",
'D3_MULTILANG_NEWFIELDERROR' => "The marked items can't inserted, because the ident still exists.",
'D3_MULTILANG_SUCC_COUNT' => ' items - ',
'D3_MULTILANG_XLS_CREATOR' => 'D³ Translation Wizzard Module for Oxid eShop',
'D3_MULTILANG_XLS_TITLE' => 'translations',
'D3_MULTILANG_XLS_LOCALEERR' => 'Unable to set language setting "%s" - setting is "en_us"',
'D3_MULTILANG_XLS_LANG' => 'language',
'D3_MULTILANG_CLEARTMP_IMPORT' => '<img src="../modules/d3/modcfg/public/d3logo.php" alt="D³" title="D³ Data Development"> <b>Translation Wizzard</b>: import text items first',
'D3_MULTILANG_INSTALL_EXECIMPORT' => 'Before using the module, it is necessary to import the used test items. Have this done automatically in the installation process or start the import before activating the module in the admin area of your shop.',
'D3_MULTILANG_INSTALL_IMPORTSUCC' => '%i text items imported from existing files',
'D3_MULTILANG_INSTALL_NOCSCOLLATION' => 'The database does not provide a case-sensitive collation for the %1$s field of the %2$s table. Please provide a suitable collation and adjust the database field accordingly. Until then, you can not use identically named identifiers with different capitalization.',
'D3_MULTILANG_EXC_NOIMPORTFILE' => 'No import file was loaded.'
);

View File

@ -1,387 +1,387 @@
[{include file="headitem.tpl" title="GENERAL_ADMIN_TITLE"|oxmultilangassign}]
<script type="text/javascript">
<!--
[{if $updatelist == 1}]
UpdateList('[{$oxid}]');
[{/if}]
function UpdateList( sID)
{
var oSearch = parent.list.document.getElementById("search");
oSearch.oxid.value=sID;
oSearch.fnc.value='';
oSearch.submit();
}
function EditThis( sID)
{
var oTransfer = document.getElementById("transfer");
oTransfer.oxid.value=sID;
oTransfer.cl.value='';
oTransfer.submit();
var oSearch = parent.list.document.getElementById("search");
oSearch.actedit.value = 0;
oSearch.oxid.value=sID;
oSearch.submit();
}
function _groupExp(el)
{
var _cur = el.parentNode;
if (_cur.className == "exp") _cur.className = "";
else _cur.className = "exp";
}
-->
</script>
<style type="text/css">
<!--
.ext_edittext {
padding: 2px;
}
fieldset{
border: 1px inset black;
background-color: #F0F0F0;
}
legend{
font-weight: bold;
}
dl dt{
font-weight: normal;
width: 55%;
}
div.options {
float: left;
width: 50%;
}
-->
</style>
[{if $oView->getStatusMessages()}]
<div class="errorbox">
[{foreach from=$oView->getStatusMessages() item="sMessage"}]
<p>[{$sMessage}]</p>
[{/foreach}]
</div>
[{/if}]
[{if $readonly}]
[{assign var="readonly" value="readonly disabled"}]
[{else}]
[{assign var="readonly" value=""}]
[{/if}]
<form name="transfer" id="transfer" action="[{$oViewConf->getSelfLink()}]" method="post">
[{$oViewConf->getHiddenSid()}]
<input type="hidden" name="oxid" value="[{$oxid}]">
<input type="hidden" name="cl" value="[{$oViewConf->getActiveClassName()}]">
<input type="hidden" name="fnc" value="">
<input type="hidden" name="actshop" value="[{$shop->id}]">
<input type="hidden" name="editlanguage" value="[{$editlanguage}]">
</form>
<table border="0" style="width: 98%;">
<tr>
<td style="vertical-align: top;" class="edittext">
[{block name="d3_cfg_multilang_imex__setform"}]
<form name="myedit" id="myedit" action="[{$oViewConf->getSelfLink()}]" method="post">
[{$oViewConf->getHiddenSid()}]
<input type="hidden" name="cl" value="[{$oViewConf->getActiveClassName()}]">
<input type="hidden" name="fnc" value="save">
<input type="hidden" name="oxid" value="[{$oxid}]">
<input type="hidden" name="editval[d3_cfg_mod__oxid]" value="[{$oxid}]">
[{if $oView->getValueStatus() == 'error'}]
<hr>
<span style="font-weight: bold;">[{oxmultilang ident="D3_CFG_MOD_GENERAL_NOCONFIG_DESC"}]</span>
<br>
<br>
<span class="d3modcfg_btn fixed icon status_attention">
<input type="submit" value="[{oxmultilang ident="D3_CFG_MOD_GENERAL_NOCONFIG_BTN"}]">
<span></span>
</span>
<div style="float: none; clear: both;"></div>
[{else}]
[{block name="d3_cfg_multilang_imex__settings"}]
[{include file="d3_cfg_mod_active.tpl"}]
<div class="groupExp">
<div class="">
<a class="rc" onclick="_groupExp(this); return false;" href="#">
<span style="font-weight: bold;">
[{oxmultilang ident="D3_MULTILANG_SETTINGS"}]
</span>
</a>
<dl>
<dt>
<label for="blMultilang_SaveMissingItems">[{oxmultilang ident="D3_MULTILANG_MODCFG_SAVEMISS"}]</label>
</dt>
<dd>
<input type="hidden" name="value[d3_cfg_mod__blMultilang_SaveMissingItems]" value="0">
<input id="blMultilang_SaveMissingItems" class="edittext ext_edittext" type="checkbox" name="value[blMultilang_SaveMissingItems]" value='1' [{if $edit->getValue('blMultilang_SaveMissingItems') == 1}]checked[{/if}]>
</dd>
</dl>
<dl>
<dt>
<label for="sMultilang_Separator">[{oxmultilang ident="D3_MULTILANG_MODCFG_SEPARATOR"}]</label>
</dt>
<dd>
<input id="sMultilang_Separator" class="edittext ext_edittext" size="3" maxlength="1" type="text" name="value[sMultilang_Separator]" value='[{if $edit->getValue('sMultilang_Separator')}][{$edit->getValue('sMultilang_Separator')}][{else}]|[{/if}]'>
</dd>
</dl>
<dl>
<dt>
<label for="sMultilang_Encloser">[{oxmultilang ident="D3_MULTILANG_MODCFG_ENCLOSER"}]</label>
</dt>
<dd>
<input id="sMultilang_Encloser" class="edittext ext_edittext" size="3" maxlength="1" type="text" name="value[sMultilang_Encloser]" value='[{if $edit->getValue('sMultilang_Encloser')}][{$edit->getValue('sMultilang_Encloser')}][{else}]"[{/if}]'>
</dd>
</dl>
<dl>
<dt>
<label for="blMultilang_trimWhiteSpaces">[{oxmultilang ident="D3_MULTILANG_MODCFG_TRIMWHITESPACES"}]</label>
</dt>
<dd>
<input type="hidden" name="value[d3_cfg_mod__blMultilang_trimWhiteSpaces]" value="0">
<input id="blMultilang_trimWhiteSpaces" class="edittext ext_edittext" type="checkbox" name="value[blMultilang_trimWhiteSpaces]" value='1' [{if $edit->getValue('blMultilang_trimWhiteSpaces') == 1}]checked[{/if}]>
</dd>
</dl>
<dl>
<dt>
<label for="blMultilang_addMappedTranslations">[{oxmultilang ident="D3_MULTILANG_MODCFG_ADDMAPPEDTRANSLATIONS"}]</label>
</dt>
<dd>
<input type="hidden" name="value[d3_cfg_mod__blMultilang_addMappedTranslations]" value="0">
<input id="blMultilang_addMappedTranslations" class="edittext ext_edittext" type="checkbox" name="value[blMultilang_addMappedTranslations]" value='1' [{if $edit->getValue('blMultilang_addMappedTranslations') == 1}]checked[{/if}]>
[{oxinputhelp ident="D3_MULTILANG_MODCFG_ADDMAPPEDTRANSLATIONS_DESC"}]
</dd>
</dl>
<dl>
<dt>
<label for="blMultilang_OutputMimeType">[{oxmultilang ident="D3_MULTILANG_MODCFG_MIME"}]</label>
</dt>
<dd>
<input type="hidden" name="value[d3_cfg_mod__blMultilang_OutputMimeType]" value="0">
<input id="blMultilang_OutputMimeType" class="edittext ext_edittext" type="checkbox" name="value[d3_cfg_mod__blMultilang_OutputMimeType]" value='1' [{if $edit->getValue('blMultilang_OutputMimeType') == 1}]checked[{/if}]>
</dd>
</dl>
</div>
</div>
[{/block}]
<span class="d3modcfg_btn icon d3color-green">
<button type="submit" name="save">
<i class="fa fa-check-circle fa-inverse"></i>
[{oxmultilang ident="D3_CFG_MOD_GENERAL_SAVE"}]
</button>
</span>
[{/if}]
</form>
<div class="clear"></div><br>
[{/block}]
[{block name="d3_cfg_multilang_imex__mime"}]
[{if $oView->getMimeType()}]
Mime-Type: [{$oView->getMimeType()}]<br><br>
[{/if}]
[{/block}]
[{block name="d3_cfg_multilang_imex__export"}]
[{if $oView->getValueStatus() != 'error'}]
<fieldset>
<legend>[{oxmultilang ident="D3_MULTILANG_EXPORT"}]</legend>
<table cellspacing="0" cellpadding="0" border="0" width="100%">
<tr>
<td class="edittext ext_edittext">
<form name="export" id="export" action="[{$oViewConf->getSelfLink()}]" method="post">
[{$oViewConf->getHiddenSid()}]
<input type="hidden" name="cl" value="[{$oViewConf->getActiveClassName()}]">
<input type="hidden" name="fnc" value="export">
<input type="hidden" name="oxid" value="[{$oxid}]">
<input type="hidden" name="lstrt" value="[{$lstrt}]">
<input type="hidden" name="editval[d3_cfg_mod__oxid]" value="[{$oxid}]">
[{block name="d3_cfg_multilang_imex__exporttype"}]
<input type="radio" id="exportcsv" name="exporttype" value="csv" [{if $exporttype == 'csv' || !$exporttype}]checked[{/if}] [{$readonly}]> <label for="exportcsv">[{oxmultilang ident="D3_MULTILANG_FILETYPECSV"}]</label><br>
<input type="radio" id="exportoxid" name="exporttype" value="oxid" [{if $oView->getExportType() == 'oxid'}]checked[{/if}] [{$readonly}]> <label for="exportoxid">[{oxmultilang ident="D3_MULTILANG_FILETYPEOXID"}]</label><br>
[{/block}]
<br>
<span class="d3modcfg_btn icon d3color-blue">
<button type="submit" name="save" [{$readonly}]>
<i class="fa fa-download"></i>
[{oxmultilang ident="D3_MULTILANG_STARTEXPORT"}]
</button>
</span>
</form>
</td>
</tr>
</table>
</fieldset>
[{/if}]
[{/block}]
<br>
[{block name="d3_cfg_multilang_imex__import"}]
[{if $oView->getValueStatus() != 'error'}]
<fieldset>
<legend>[{oxmultilang ident="D3_MULTILANG_IMPORT"}]</legend>
<table cellspacing="0" cellpadding="0" border="0" width="100%">
<colgroup>
<col width="30%">
</colgroup>
[{block name="d3_cfg_multilang_imex__importinstalled"}]
<tr>
<td class="edittext ext_edittext">
<span style="font-weight: bold;">[{oxmultilang ident="D3_MULTILANG_FILETYPEINSTALLED"}]:</span>
</td>
<td class="edittext ext_edittext">
<form name="import" id="import" action="[{$oViewConf->getSelfLink()}]" method="post">
[{$oViewConf->getHiddenSid()}]
<input type="hidden" name="cl" value="[{$oViewConf->getActiveClassName()}]">
<input type="hidden" name="fnc" value="import">
<input type="hidden" name="type" value="installed">
<input type="hidden" name="oxid" value="[{$oxid}]">
<input type="hidden" name="lstrt" value="[{$lstrt}]">
<input type="hidden" name="editval[d3_cfg_mod__oxid]" value="[{$oxid}]">
<span class="d3modcfg_btn icon d3color-blue">
<button type="submit" name="save">
<i class="fa fa-upload"></i>
[{oxmultilang ident="D3_MULTILANG_IMPORTSTARTINSTALLED"}]
</button>
</span>
</form>
</td>
</tr>
[{/block}]
[{block name="d3_cfg_multilang_imex__importcsv"}]
<tr>
<td colspan="2">
<hr>
</td>
</tr>
<tr>
<td class="edittext ext_edittext">
<span style="font-weight: bold;">[{oxmultilang ident="D3_MULTILANG_FILETYPECSV"}]:</span>
</td>
<td class="edittext ext_edittext">
<form name="import" id="import" enctype="multipart/form-data" action="[{$oViewConf->getSelfLink()}]" method="post">
<div class="options">
<input type="hidden" name="MAX_FILE_SIZE" value="2000000">
[{$oViewConf->getHiddenSid()}]
<input type="hidden" name="cl" value="[{$oViewConf->getActiveClassName()}]">
<input type="hidden" name="fnc" value="import">
<input type="hidden" name="type" value="csv">
<input type="hidden" name="oxid" value="[{$oxid}]">
<input type="hidden" name="lstrt" value="[{$lstrt}]">
<input type="hidden" name="editval[d3_cfg_mod__oxid]" value="[{$oxid}]">
<input class="editinput" name="file[csv]" type="file" [{$readonly}] accept="text/comma-separated-values">
<br>
<span class="d3modcfg_btn icon d3color-blue">
<button type="submit" name="save" [{$readonly}]>
<i class="fa fa-upload"></i>
[{oxmultilang ident="D3_MULTILANG_IMPORTSTARTCSV"}]
</button>
</span>
</div>
<div class="options">
<input type="hidden" name="overwrite_csv" value="0">
<input type="checkbox" id="overwrite_csv" name="overwrite_csv" value="1" [{if $oView->getRequParam('overwrite_csv') == "1"}]checked[{/if}] [{$readonly}]> <label for="overwrite_csv">[{oxmultilang ident="D3_MULTILANG_IMPORTOVERWRITE"}]</label><br>
<input type="hidden" name="original_csv" value="0">
<input type="checkbox" id="original_csv" name="original_csv" value="1" [{if $oView->getRequParam('original_csv') == "1"}]checked[{/if}] [{$readonly}]> <label for="original_csv">[{oxmultilang ident="D3_MULTILANG_SETORIGINAL"}]</label><br>
<input type="hidden" name="ignore_mime" value="0">
<input type="checkbox" id="ignore_mime" name="ignore_mime" value="1" [{if $oView->getRequParam('ignore_mime') == "1"}]checked[{/if}] [{$readonly}]> <label for="ignore_mime">[{oxmultilang ident="D3_MULTILANG_IGNOREMIME"}] [{oxinputhelp ident="D3_MULTILANG_IGNOREMIME_DESC"}]</label>
</div>
</form>
</td>
</tr>
[{/block}]
[{block name="d3_cfg_multilang_imex__importoxid"}]
<tr>
<td colspan="2">
<hr>
</td>
</tr>
<tr>
<td class="edittext ext_edittext">
<span style="font-weight: bold;">[{oxmultilang ident="D3_MULTILANG_FILETYPEOXID"}] (PHP):</span>
</td>
<td class="edittext ext_edittext">
<form name="import" id="import" enctype="multipart/form-data" action="[{$oViewConf->getSelfLink()}]" method="post">
<div class="options">
<input type="hidden" name="MAX_FILE_SIZE" value="2000000">
[{$oViewConf->getHiddenSid()}]
<input type="hidden" name="cl" value="[{$oViewConf->getActiveClassName()}]">
<input type="hidden" name="fnc" value="import">
<input type="hidden" name="type" value="oxid">
<input type="hidden" name="oxid" value="[{$oxid}]">
<input type="hidden" name="lstrt" value="[{$lstrt}]">
<input type="hidden" name="editval[d3_cfg_mod__oxid]" value="[{$oxid}]">
<input class="editinput" name="file[oxid]" type="file" [{$readonly}]>
<br>
<label for="phpinlang">[{oxmultilang ident="D3_MULTILANG_IMPORTOXIDLANG"}]</label>
<select name="lang[oxid]" size="1" id="phpinlang" [{$readonly}]>
[{foreach from=$aImportLanguages item=lang}]
<option value="[{$lang->id}]" [{if $lang->selected}]SELECTED[{/if}]>[{$lang->name}]</option>
[{/foreach}]
</select>
<br>
<span class="d3modcfg_btn icon d3color-blue">
<button type="submit" name="save" [{$readonly}]>
<i class="fa fa-upload"></i>
[{oxmultilang ident="D3_MULTILANG_IMPORTSTARTOXID"}]
</button>
</span>
</div>
<div class="options">
<input type="hidden" name="overwrite_oxid" value="0">
<input type="checkbox" id="overwrite_oxid" name="overwrite_oxid" value="1" [{if $oView->getRequParam('overwrite_oxid') == "1"}]checked[{/if}] [{$readonly}]> <label for="overwrite_oxid">[{oxmultilang ident="D3_MULTILANG_IMPORTOVERWRITE"}]</label><br>
<input type="hidden" name="original_oxid" value="0">
<input type="checkbox" id="original_oxid" name="original_oxid" value="1" [{if $oView->getRequParam('original_oxid') == "1"}]checked[{/if}] [{$readonly}]> <label for="original_oxid">[{oxmultilang ident="D3_MULTILANG_SETORIGINAL"}]</label><br>
<input type="hidden" name="admin_oxid" value="0">
<input type="checkbox" id="admin_oxid" name="admin_oxid" value="1" [{if $oView->getRequParam('admin_oxid') == "1"}]checked[{/if}] [{$readonly}]> <label for="admin_oxid">[{oxmultilang ident="D3_MULTILANG_ISADMIN"}]</label><br>
<input type="hidden" name="ignore_mime" value="0">
<input type="checkbox" id="ignore_mime" name="ignore_mime" value="1" [{if $oView->getRequParam('ignore_mime') == "1"}]checked[{/if}] [{$readonly}]> <label for="ignore_mime">[{oxmultilang ident="D3_MULTILANG_IGNOREMIME"}] [{oxinputhelp ident="D3_MULTILANG_IGNOREMIME_DESC"}]</label>
</div>
</form>
</td>
</tr>
[{/block}]
</table>
</fieldset>
[{/if}]
[{/block}]
</td>
</tr>
</table>
[{include file="d3_cfg_mod_inc.tpl"}]
[{block name="d3_cfg_multilang_imex__clrtmp"}]
[{if $clrTmp}]
<script type="text/javascript">
if (confirm('[{oxmultilang ident="D3_MULTILANG_CLEARLANGCACHE"}]')) {
var oTransfer = parent.edit.document.getElementById("transfer");
oTransfer.fnc.value='clearLangCache';
oTransfer.submit();
}
</script>
[{/if}]
[{include file="headitem.tpl" title="GENERAL_ADMIN_TITLE"|oxmultilangassign}]
<script type="text/javascript">
<!--
[{if $updatelist == 1}]
UpdateList('[{$oxid}]');
[{/if}]
function UpdateList( sID)
{
var oSearch = parent.list.document.getElementById("search");
oSearch.oxid.value=sID;
oSearch.fnc.value='';
oSearch.submit();
}
function EditThis( sID)
{
var oTransfer = document.getElementById("transfer");
oTransfer.oxid.value=sID;
oTransfer.cl.value='';
oTransfer.submit();
var oSearch = parent.list.document.getElementById("search");
oSearch.actedit.value = 0;
oSearch.oxid.value=sID;
oSearch.submit();
}
function _groupExp(el)
{
var _cur = el.parentNode;
if (_cur.className == "exp") _cur.className = "";
else _cur.className = "exp";
}
-->
</script>
<style type="text/css">
<!--
.ext_edittext {
padding: 2px;
}
fieldset{
border: 1px inset black;
background-color: #F0F0F0;
}
legend{
font-weight: bold;
}
dl dt{
font-weight: normal;
width: 55%;
}
div.options {
float: left;
width: 50%;
}
-->
</style>
[{if $oView->getStatusMessages()}]
<div class="errorbox">
[{foreach from=$oView->getStatusMessages() item="sMessage"}]
<p>[{$sMessage}]</p>
[{/foreach}]
</div>
[{/if}]
[{if $readonly}]
[{assign var="readonly" value="readonly disabled"}]
[{else}]
[{assign var="readonly" value=""}]
[{/if}]
<form name="transfer" id="transfer" action="[{$oViewConf->getSelfLink()}]" method="post">
[{$oViewConf->getHiddenSid()}]
<input type="hidden" name="oxid" value="[{$oxid}]">
<input type="hidden" name="cl" value="[{$oViewConf->getActiveClassName()}]">
<input type="hidden" name="fnc" value="">
<input type="hidden" name="actshop" value="[{$shop->id}]">
<input type="hidden" name="editlanguage" value="[{$editlanguage}]">
</form>
<table border="0" style="width: 98%;">
<tr>
<td style="vertical-align: top;" class="edittext">
[{block name="d3_cfg_multilang_imex__setform"}]
<form name="myedit" id="myedit" action="[{$oViewConf->getSelfLink()}]" method="post">
[{$oViewConf->getHiddenSid()}]
<input type="hidden" name="cl" value="[{$oViewConf->getActiveClassName()}]">
<input type="hidden" name="fnc" value="save">
<input type="hidden" name="oxid" value="[{$oxid}]">
<input type="hidden" name="editval[d3_cfg_mod__oxid]" value="[{$oxid}]">
[{if $oView->getValueStatus() == 'error'}]
<hr>
<span style="font-weight: bold;">[{oxmultilang ident="D3_CFG_MOD_GENERAL_NOCONFIG_DESC"}]</span>
<br>
<br>
<span class="d3modcfg_btn fixed icon status_attention">
<input type="submit" value="[{oxmultilang ident="D3_CFG_MOD_GENERAL_NOCONFIG_BTN"}]">
<span></span>
</span>
<div style="float: none; clear: both;"></div>
[{else}]
[{block name="d3_cfg_multilang_imex__settings"}]
[{include file="d3_cfg_mod_active.tpl"}]
<div class="groupExp">
<div class="">
<a class="rc" onclick="_groupExp(this); return false;" href="#">
<span style="font-weight: bold;">
[{oxmultilang ident="D3_MULTILANG_SETTINGS"}]
</span>
</a>
<dl>
<dt>
<label for="blMultilang_SaveMissingItems">[{oxmultilang ident="D3_MULTILANG_MODCFG_SAVEMISS"}]</label>
</dt>
<dd>
<input type="hidden" name="value[d3_cfg_mod__blMultilang_SaveMissingItems]" value="0">
<input id="blMultilang_SaveMissingItems" class="edittext ext_edittext" type="checkbox" name="value[blMultilang_SaveMissingItems]" value='1' [{if $edit->getValue('blMultilang_SaveMissingItems') == 1}]checked[{/if}]>
</dd>
</dl>
<dl>
<dt>
<label for="sMultilang_Separator">[{oxmultilang ident="D3_MULTILANG_MODCFG_SEPARATOR"}]</label>
</dt>
<dd>
<input id="sMultilang_Separator" class="edittext ext_edittext" size="3" maxlength="1" type="text" name="value[sMultilang_Separator]" value='[{if $edit->getValue('sMultilang_Separator')}][{$edit->getValue('sMultilang_Separator')}][{else}]|[{/if}]'>
</dd>
</dl>
<dl>
<dt>
<label for="sMultilang_Encloser">[{oxmultilang ident="D3_MULTILANG_MODCFG_ENCLOSER"}]</label>
</dt>
<dd>
<input id="sMultilang_Encloser" class="edittext ext_edittext" size="3" maxlength="1" type="text" name="value[sMultilang_Encloser]" value='[{if $edit->getValue('sMultilang_Encloser')}][{$edit->getValue('sMultilang_Encloser')}][{else}]"[{/if}]'>
</dd>
</dl>
<dl>
<dt>
<label for="blMultilang_trimWhiteSpaces">[{oxmultilang ident="D3_MULTILANG_MODCFG_TRIMWHITESPACES"}]</label>
</dt>
<dd>
<input type="hidden" name="value[d3_cfg_mod__blMultilang_trimWhiteSpaces]" value="0">
<input id="blMultilang_trimWhiteSpaces" class="edittext ext_edittext" type="checkbox" name="value[blMultilang_trimWhiteSpaces]" value='1' [{if $edit->getValue('blMultilang_trimWhiteSpaces') == 1}]checked[{/if}]>
</dd>
</dl>
<dl>
<dt>
<label for="blMultilang_addMappedTranslations">[{oxmultilang ident="D3_MULTILANG_MODCFG_ADDMAPPEDTRANSLATIONS"}]</label>
</dt>
<dd>
<input type="hidden" name="value[d3_cfg_mod__blMultilang_addMappedTranslations]" value="0">
<input id="blMultilang_addMappedTranslations" class="edittext ext_edittext" type="checkbox" name="value[blMultilang_addMappedTranslations]" value='1' [{if $edit->getValue('blMultilang_addMappedTranslations') == 1}]checked[{/if}]>
[{oxinputhelp ident="D3_MULTILANG_MODCFG_ADDMAPPEDTRANSLATIONS_DESC"}]
</dd>
</dl>
<dl>
<dt>
<label for="blMultilang_OutputMimeType">[{oxmultilang ident="D3_MULTILANG_MODCFG_MIME"}]</label>
</dt>
<dd>
<input type="hidden" name="value[d3_cfg_mod__blMultilang_OutputMimeType]" value="0">
<input id="blMultilang_OutputMimeType" class="edittext ext_edittext" type="checkbox" name="value[d3_cfg_mod__blMultilang_OutputMimeType]" value='1' [{if $edit->getValue('blMultilang_OutputMimeType') == 1}]checked[{/if}]>
</dd>
</dl>
</div>
</div>
[{/block}]
<span class="d3modcfg_btn icon d3color-green">
<button type="submit" name="save">
<i class="fa fa-check-circle fa-inverse"></i>
[{oxmultilang ident="D3_CFG_MOD_GENERAL_SAVE"}]
</button>
</span>
[{/if}]
</form>
<div class="clear"></div><br>
[{/block}]
[{block name="d3_cfg_multilang_imex__mime"}]
[{if $oView->getMimeType()}]
Mime-Type: [{$oView->getMimeType()}]<br><br>
[{/if}]
[{/block}]
[{block name="d3_cfg_multilang_imex__export"}]
[{if $oView->getValueStatus() != 'error'}]
<fieldset>
<legend>[{oxmultilang ident="D3_MULTILANG_EXPORT"}]</legend>
<table cellspacing="0" cellpadding="0" border="0" width="100%">
<tr>
<td class="edittext ext_edittext">
<form name="export" id="export" action="[{$oViewConf->getSelfLink()}]" method="post">
[{$oViewConf->getHiddenSid()}]
<input type="hidden" name="cl" value="[{$oViewConf->getActiveClassName()}]">
<input type="hidden" name="fnc" value="export">
<input type="hidden" name="oxid" value="[{$oxid}]">
<input type="hidden" name="lstrt" value="[{$lstrt}]">
<input type="hidden" name="editval[d3_cfg_mod__oxid]" value="[{$oxid}]">
[{block name="d3_cfg_multilang_imex__exporttype"}]
<input type="radio" id="exportcsv" name="exporttype" value="csv" [{if $exporttype == 'csv' || !$exporttype}]checked[{/if}] [{$readonly}]> <label for="exportcsv">[{oxmultilang ident="D3_MULTILANG_FILETYPECSV"}]</label><br>
<input type="radio" id="exportoxid" name="exporttype" value="oxid" [{if $oView->getExportType() == 'oxid'}]checked[{/if}] [{$readonly}]> <label for="exportoxid">[{oxmultilang ident="D3_MULTILANG_FILETYPEOXID"}]</label><br>
[{/block}]
<br>
<span class="d3modcfg_btn icon d3color-blue">
<button type="submit" name="save" [{$readonly}]>
<i class="fa fa-download"></i>
[{oxmultilang ident="D3_MULTILANG_STARTEXPORT"}]
</button>
</span>
</form>
</td>
</tr>
</table>
</fieldset>
[{/if}]
[{/block}]
<br>
[{block name="d3_cfg_multilang_imex__import"}]
[{if $oView->getValueStatus() != 'error'}]
<fieldset>
<legend>[{oxmultilang ident="D3_MULTILANG_IMPORT"}]</legend>
<table cellspacing="0" cellpadding="0" border="0" width="100%">
<colgroup>
<col width="30%">
</colgroup>
[{block name="d3_cfg_multilang_imex__importinstalled"}]
<tr>
<td class="edittext ext_edittext">
<span style="font-weight: bold;">[{oxmultilang ident="D3_MULTILANG_FILETYPEINSTALLED"}]:</span>
</td>
<td class="edittext ext_edittext">
<form name="import" id="import" action="[{$oViewConf->getSelfLink()}]" method="post">
[{$oViewConf->getHiddenSid()}]
<input type="hidden" name="cl" value="[{$oViewConf->getActiveClassName()}]">
<input type="hidden" name="fnc" value="import">
<input type="hidden" name="type" value="installed">
<input type="hidden" name="oxid" value="[{$oxid}]">
<input type="hidden" name="lstrt" value="[{$lstrt}]">
<input type="hidden" name="editval[d3_cfg_mod__oxid]" value="[{$oxid}]">
<span class="d3modcfg_btn icon d3color-blue">
<button type="submit" name="save">
<i class="fa fa-upload"></i>
[{oxmultilang ident="D3_MULTILANG_IMPORTSTARTINSTALLED"}]
</button>
</span>
</form>
</td>
</tr>
[{/block}]
[{block name="d3_cfg_multilang_imex__importcsv"}]
<tr>
<td colspan="2">
<hr>
</td>
</tr>
<tr>
<td class="edittext ext_edittext">
<span style="font-weight: bold;">[{oxmultilang ident="D3_MULTILANG_FILETYPECSV"}]:</span>
</td>
<td class="edittext ext_edittext">
<form name="import" id="import" enctype="multipart/form-data" action="[{$oViewConf->getSelfLink()}]" method="post">
<div class="options">
<input type="hidden" name="MAX_FILE_SIZE" value="2000000">
[{$oViewConf->getHiddenSid()}]
<input type="hidden" name="cl" value="[{$oViewConf->getActiveClassName()}]">
<input type="hidden" name="fnc" value="import">
<input type="hidden" name="type" value="csv">
<input type="hidden" name="oxid" value="[{$oxid}]">
<input type="hidden" name="lstrt" value="[{$lstrt}]">
<input type="hidden" name="editval[d3_cfg_mod__oxid]" value="[{$oxid}]">
<input class="editinput" name="file[csv]" type="file" [{$readonly}] accept="text/comma-separated-values">
<br>
<span class="d3modcfg_btn icon d3color-blue">
<button type="submit" name="save" [{$readonly}]>
<i class="fa fa-upload"></i>
[{oxmultilang ident="D3_MULTILANG_IMPORTSTARTCSV"}]
</button>
</span>
</div>
<div class="options">
<input type="hidden" name="overwrite_csv" value="0">
<input type="checkbox" id="overwrite_csv" name="overwrite_csv" value="1" [{if $oView->getRequParam('overwrite_csv') == "1"}]checked[{/if}] [{$readonly}]> <label for="overwrite_csv">[{oxmultilang ident="D3_MULTILANG_IMPORTOVERWRITE"}]</label><br>
<input type="hidden" name="original_csv" value="0">
<input type="checkbox" id="original_csv" name="original_csv" value="1" [{if $oView->getRequParam('original_csv') == "1"}]checked[{/if}] [{$readonly}]> <label for="original_csv">[{oxmultilang ident="D3_MULTILANG_SETORIGINAL"}]</label><br>
<input type="hidden" name="ignore_mime" value="0">
<input type="checkbox" id="ignore_mime" name="ignore_mime" value="1" [{if $oView->getRequParam('ignore_mime') == "1"}]checked[{/if}] [{$readonly}]> <label for="ignore_mime">[{oxmultilang ident="D3_MULTILANG_IGNOREMIME"}] [{oxinputhelp ident="D3_MULTILANG_IGNOREMIME_DESC"}]</label>
</div>
</form>
</td>
</tr>
[{/block}]
[{block name="d3_cfg_multilang_imex__importoxid"}]
<tr>
<td colspan="2">
<hr>
</td>
</tr>
<tr>
<td class="edittext ext_edittext">
<span style="font-weight: bold;">[{oxmultilang ident="D3_MULTILANG_FILETYPEOXID"}] (PHP):</span>
</td>
<td class="edittext ext_edittext">
<form name="import" id="import" enctype="multipart/form-data" action="[{$oViewConf->getSelfLink()}]" method="post">
<div class="options">
<input type="hidden" name="MAX_FILE_SIZE" value="2000000">
[{$oViewConf->getHiddenSid()}]
<input type="hidden" name="cl" value="[{$oViewConf->getActiveClassName()}]">
<input type="hidden" name="fnc" value="import">
<input type="hidden" name="type" value="oxid">
<input type="hidden" name="oxid" value="[{$oxid}]">
<input type="hidden" name="lstrt" value="[{$lstrt}]">
<input type="hidden" name="editval[d3_cfg_mod__oxid]" value="[{$oxid}]">
<input class="editinput" name="file[oxid]" type="file" [{$readonly}]>
<br>
<label for="phpinlang">[{oxmultilang ident="D3_MULTILANG_IMPORTOXIDLANG"}]</label>
<select name="lang[oxid]" size="1" id="phpinlang" [{$readonly}]>
[{foreach from=$aImportLanguages item=lang}]
<option value="[{$lang->id}]" [{if $lang->selected}]SELECTED[{/if}]>[{$lang->name}]</option>
[{/foreach}]
</select>
<br>
<span class="d3modcfg_btn icon d3color-blue">
<button type="submit" name="save" [{$readonly}]>
<i class="fa fa-upload"></i>
[{oxmultilang ident="D3_MULTILANG_IMPORTSTARTOXID"}]
</button>
</span>
</div>
<div class="options">
<input type="hidden" name="overwrite_oxid" value="0">
<input type="checkbox" id="overwrite_oxid" name="overwrite_oxid" value="1" [{if $oView->getRequParam('overwrite_oxid') == "1"}]checked[{/if}] [{$readonly}]> <label for="overwrite_oxid">[{oxmultilang ident="D3_MULTILANG_IMPORTOVERWRITE"}]</label><br>
<input type="hidden" name="original_oxid" value="0">
<input type="checkbox" id="original_oxid" name="original_oxid" value="1" [{if $oView->getRequParam('original_oxid') == "1"}]checked[{/if}] [{$readonly}]> <label for="original_oxid">[{oxmultilang ident="D3_MULTILANG_SETORIGINAL"}]</label><br>
<input type="hidden" name="admin_oxid" value="0">
<input type="checkbox" id="admin_oxid" name="admin_oxid" value="1" [{if $oView->getRequParam('admin_oxid') == "1"}]checked[{/if}] [{$readonly}]> <label for="admin_oxid">[{oxmultilang ident="D3_MULTILANG_ISADMIN"}]</label><br>
<input type="hidden" name="ignore_mime" value="0">
<input type="checkbox" id="ignore_mime" name="ignore_mime" value="1" [{if $oView->getRequParam('ignore_mime') == "1"}]checked[{/if}] [{$readonly}]> <label for="ignore_mime">[{oxmultilang ident="D3_MULTILANG_IGNOREMIME"}] [{oxinputhelp ident="D3_MULTILANG_IGNOREMIME_DESC"}]</label>
</div>
</form>
</td>
</tr>
[{/block}]
</table>
</fieldset>
[{/if}]
[{/block}]
</td>
</tr>
</table>
[{include file="d3_cfg_mod_inc.tpl"}]
[{block name="d3_cfg_multilang_imex__clrtmp"}]
[{if $clrTmp}]
<script type="text/javascript">
if (confirm('[{oxmultilang ident="D3_MULTILANG_CLEARLANGCACHE"}]')) {
var oTransfer = parent.edit.document.getElementById("transfer");
oTransfer.fnc.value='clearLangCache';
oTransfer.submit();
}
</script>
[{/if}]
[{/block}]

View File

@ -1,422 +1,422 @@
[{include file="headitem.tpl" title="GENERAL_ADMIN_TITLE"|oxmultilangassign}]
<script type="text/javascript">
<!--
function DeleteThis( sID)
{
blCheck = confirm("[{oxmultilang ident="GENERAL_YOUWANTTODELETE"}]");
if( blCheck === true)
{
var oTransfer = parent.edit.document.getElementById("transfer");
oTransfer.deloxid.value=sID;
oTransfer.fnc.value='deleteentry';
oTransfer.actedit.value=0;
oTransfer.submit();
}
}
function popUp(evt,currElem)
{
var popUpWin = document.getElementById(currElem);
var y = parseInt(evt.clientY) - 33 - parseInt((17.5*(popUpWin.innerHTML.split(/<br[ \/^>]*>/gi).length-1)));
var x = parseInt(evt.clientX) - 50;
if(document.all){
if ( x > document.body.clientWidth - 150 ){
x = parseInt(document.body.clientWidth) - 150;
y = y - 15;
}
}
else{
if ( x > self.innerWidth - 170 ){
x = parseInt(self.innerWidth) - 170;
}
}
popUpWin.style.top = Math.max(2,y)+'px';
popUpWin.style.left= Math.max(2,x)+'px';
popUpWin.style.visibility = "visible";
window.status = "";
}
function popDown(currElem)
{
var popUpWin = document.getElementById(currElem);
popUpWin.style.visibility ="hidden"
}
function _groupExp(el)
{
var _cur = el.parentNode;
if (_cur.className === "exp") _cur.className = "";
else _cur.className = "exp";
}
-->
</script>
<style type="text/css">
<!--
.ext_edittext {
padding: 2px;
}
fieldset{
border: 1px inset black;
background-color: #F0F0F0;
}
legend{
font-weight: bold;
}
dl dt{
font-weight: normal;
width: 55%;
}
.itemlist td {
padding: 0 5px;
}
-->
</style>
[{if $readonly}]
[{assign var="readonly" value="readonly disabled"}]
[{else}]
[{assign var="readonly" value=""}]
[{/if}]
<form name="transfer" id="transfer" action="[{$oViewConf->getSelfLink()}]" method="post">
[{$oViewConf->getHiddenSid()}]
<input type="hidden" name="oxid" value="[{$oxid}]">
<input type="hidden" name="deloxid" value="">
<input type="hidden" name="cl" value="[{$oViewConf->getActiveClassName()}]">
<input type="hidden" name="fnc" value="">
<input type="hidden" name="actedit" value="">
<input type="hidden" name="page" value="[{$iPage}]">
<input type="hidden" name="sSearchText" value="[{$sSearchText}]">
<input type="hidden" name="sSearchType" value="[{$sSearchType}]">
</form>
<table border="0" width="98%">
[{if $langsel_right != 'none' && $langsel_left != 'none'}]
[{* Suche *}]
<tr>
<td valign="top" class="edittext">
[{block name="d3_cfg_multilang_main__searchform"}]
<form name="searchform" id="searchform" action="[{$oViewConf->getSelfLink()}]" method="post">
[{$oViewConf->getHiddenSid()}]
<input type="hidden" name="cl" value="[{$oViewConf->getActiveClassName()}]">
<input type="hidden" name="fnc" value="languageselect">
<input type="hidden" name="oxid" value="[{$oxid}]">
<input type="hidden" name="lstrt" value="[{$lstrt}]">
<input type="hidden" name="sSearchType" id="sSearchType" value="default">
<input type="hidden" name="editval[d3_cfg_mod__oxid]" value="[{$oxid}]">
<fieldset>
<legend>[{oxmultilang ident="D3_MULTILANG_SEARCH"}]</legend>
<table cellspacing="0" cellpadding="0" border="0" width="100%">
<tr>
[{block name="d3_cfg_multilang_main__searchformelements"}]
<td class="edittext ext_edittext" style="width: 200px;">
<label for="sSearchText">[{oxmultilang ident="D3_MULTILANG_SEARCHDESC"}]</label>
</td>
<td class="edittext ext_edittext" align="left" colspan="2">
<input id="sSearchText" type="text" size="50" name="sSearchText" value="[{$sSearchText}]" class="edittext" style="margin-right: 5px; width: 250px; float: left;" [{$readonly}]>
<span class="d3modcfg_btn icon d3color-blue">
<button type="submit" name="save" [{$readonly}]>
<i class="fa fa-search"></i>
[{oxmultilang ident="D3_MULTILANG_SEARCHSTART"}]
</button>
</span>
</td>
</tr>
<tr>
<td colspan="2">
<div class="groupExp">
<div class="">
<a class="rc" onclick="_groupExp(this); return false;" href="#">
<span style="font-weight: bold;">
[{oxmultilang ident="D3_MULTILANG_SEARCH_FURTHER"}]
</span>
</a>
<dl>
<dt style="width: 1px;">
</dt>
<dd>
<span class="d3modcfg_btn icon d3color-blue" style="float: left; margin-right: 5px;">
<button type="submit" name="save" [{$readonly}] onclick="document.getElementById('sSearchType').value = 'emptyitems';">
<i class="fa fa-search"></i>
[{oxmultilang ident="D3_MULTILANG_SEARCHEMPTYSTART"}]
</button>
</span>
<span class="d3modcfg_btn icon d3color-blue" style="float: left; margin-right: 5px;">
<button type="submit" name="save" [{$readonly}] onclick="document.getElementById('sSearchType').value = 'identicalitems';">
<i class="fa fa-search"></i>
[{oxmultilang ident="D3_MULTILANG_SEARCHIDENTICALSTART"}]
</button>
</span>
<span class="d3modcfg_btn icon d3color-blue" style="float: left; margin-right: 5px;">
<button type="submit" name="save" [{$readonly}] onclick="document.getElementById('sSearchType').value = 'originalitems';">
<i class="fa fa-search"></i>
[{oxmultilang ident="D3_MULTILANG_SEARCHORIGINALSTART"}]
</button>
</span>
<select name="itemtype" size="1">
<option value="all">[{oxmultilang ident="D3_MULTILANG_SEARCHALL"}]</option>
<option value="frontend" [{if $sItemtype == 'frontend'}] selected[{/if}]>[{oxmultilang ident="D3_MULTILANG_SEARCHFRONTEND"}]</option>
<option value="backend" [{if $sItemtype == 'backend'}] selected[{/if}]>[{oxmultilang ident="D3_MULTILANG_SEARCHBACKEND"}]</option>
</select>
</dd>
</dl>
</div>
</div>
</td>
[{/block}]
</tr>
</table>
</fieldset>
</form>
[{/block}]
</td>
</tr>
[{/if}]
[{* Sprachwahl *}]
<tr>
<td valign="top" class="edittext">
[{block name="d3_cfg_multilang_main__langselection"}]
<form name="langsel" id="langsel" action="[{$oViewConf->getSelfLink()}]" method="post">
[{$oViewConf->getHiddenSid()}]
<input type="hidden" name="cl" value="[{$oViewConf->getActiveClassName()}]">
<input type="hidden" name="fnc" value="languageselect">
<input type="hidden" name="oxid" value="[{$oxid}]">
<input type="hidden" name="lstrt" value="[{$lstrt}]">
<input type="hidden" name="editval[d3_cfg_mod__oxid]" value="[{$oxid}]">
<fieldset>
<legend>[{oxmultilang ident="D3_MULTILANG_LANGSELECT"}]</legend>
<table cellspacing="0" cellpadding="0" border="0" width="100%">
<colgroup>
<col width="200">
<col>
<col width="26">
<col>
<col width="26">
<col width="26">
</colgroup>
<tr>
<td class="edittext ext_edittext">
&nbsp;
</td>
<td class="edittext ext_edittext" align="left">
<SELECT class="editinput" name="langsel[left]" size="1" style="width:100%; background-color: #F0F0F0; font-weight: bold; border-width:0;" onchange="document.getElementById('langsel').submit();">
<option value="">[{oxmultilang ident="D3_MULTILANG_SELECTLANGUAGE"}]</OPTION>
<option value="">---------------------------</OPTION>
[{foreach from=$aLanguages item=lang key=key}]
<option value="[{$lang->id}]" [{if $langsel_left == $lang->id && $langsel_left != 'none'}]selected[{/if}]>[{$lang->name}]</option>
[{/foreach}]
</SELECT>
</td>
<td class="edittext ext_edittext" align="left">&nbsp;</td>
<td class="edittext ext_edittext" align="left">
<SELECT class="editinput" name="langsel[right]" size="1" style="width:100%; background-color: #F0F0F0; font-weight: bold; border-width:0;" onchange="document.getElementById('langsel').submit();">
<option value="">[{oxmultilang ident="D3_MULTILANG_SELECTLANGUAGE"}]</OPTION>
<option value="">---------------------------</OPTION>
[{foreach from=$aLanguages item=lang key=key}]
<option value="[{$lang->id}]" [{if $langsel_right == $lang->id && $langsel_right != 'none'}]selected[{/if}]>[{$lang->name}]</option>
[{/foreach}]
</SELECT>
</td>
<td class="edittext ext_edittext" align="left">&nbsp;</td>
<td class="edittext ext_edittext" align="left">&nbsp;</td>
</tr>
</table>
</fieldset>
</form>
[{/block}]
</td>
</tr>
</table>
[{if $langsel_right != 'none' && $langsel_left != 'none'}]
[{* Neueinträge *}]
[{block name="d3_cfg_multilang_main__newitems"}]
<form name="myedit" id="myedit" action="[{$oViewConf->getSelfLink()}]" method="post">
[{$oViewConf->getHiddenSid()}]
<input type="hidden" name="cl" value="[{$oViewConf->getActiveClassName()}]">
<input type="hidden" name="fnc" value="save">
<input type="hidden" name="oxid" value="[{$oxid}]">
<input type="hidden" name="lstrt" value="[{$lstrt}]">
<input type="hidden" name="editval[d3_cfg_mod__oxid]" value="[{$oxid}]">
<input type="hidden" name="sSearchText" value="[{$sSearchText}]">
<input type="hidden" name="sSearchType" value="[{$sSearchType}]">
<input type="hidden" name="page" value="[{$iPage}]">
<table border="0" width="98%" class="itemlist">
<tr>
<td class="edittext ext_edittext" valign="top" align="left">
<fieldset>
<legend>[{oxmultilang ident="D3_MULTILANG_NEWITEM"}]</legend>
<table cellspacing="0" cellpadding="0" border="0" width="100%">
<colgroup>
<col width="200">
<col>
<col width="26">
<col>
<col width="26">
<col width="26">
</colgroup>
<tr>
<td class="edittext ext_edittext">
<input type="text" name="newValues1[key]" class="edittext" value="[{$newValues1.key}]" style="width: 100%;[{if $newValues1.error}] border: 2px solid red;[{/if}]" [{$readonly}]>
</td>
<td class="edittext ext_edittext" align="left">
<input type="text" size="50" name="newValues1[[{$langsel_left}]]" value="[{$newValues1.$langsel_left}]" class="edittext" style="width: 100%;[{if $newValues1.error}] border: 2px solid red;[{/if}]"[{if $langsel_left == $langsel_right}] disabled[{/if}] [{$readonly}]>
</td>
<td class="edittext ext_edittext" align="left">
<input type="checkbox" value="0" name="newValues1[original_[{$langsel_left}]]" class="edittext" style="width: 100%;" disabled title="Original Oxid" [{$readonly}]>
</td>
<td class="edittext ext_edittext" align="left">
<input type="text" size="50" name="newValues1[[{$langsel_right}]]" value="[{$newValues1.$langsel_right}]" class="edittext" style="width: 100%;[{if $newValues1.error}] border: 2px solid red;[{/if}]" [{$readonly}]>
</td>
<td class="edittext ext_edittext" align="left">
<input type="checkbox" value="0" name="newValues1[original_[{$langsel_right}]]" class="edittext" style="width: 100%;" disabled title="Original Oxid" [{$readonly}]>
</td>
<td class="edittext ext_edittext" align="left">&nbsp;</td>
</tr>
<tr>
<td class="edittext ext_edittext">
<input type="text" name="newValues2[key]" class="edittext" value="[{$newValues2.key}]" style="width: 100%;[{if $newValues2.error}] border: 2px solid red;[{/if}]" [{$readonly}]>
</td>
<td class="edittext ext_edittext" align="left">
<input type="text" size="50" name="newValues2[[{$langsel_left}]]" value="[{$newValues2.$langsel_left}]" class="edittext" style="width: 100%;[{if $newValues2.error}] border: 2px solid red;[{/if}]"[{if $langsel_left == $langsel_right}] disabled[{/if}] [{$readonly}]>
</td>
<td class="edittext ext_edittext" align="left">
<input type="checkbox" value="0" name="newValues2[original_[{$langsel_left}]]" class="edittext" style="width: 100%;" disabled title="Original Oxid" [{$readonly}]>
</td>
<td class="edittext ext_edittext" align="left">
<input type="text" size="50" name="newValues2[[{$langsel_right}]]" value="[{$newValues2.$langsel_right}]" class="edittext" style="width: 100%;[{if $newValues2.error}] border: 2px solid red;[{/if}]" [{$readonly}]>
</td>
<td class="edittext ext_edittext" align="left">
<input type="checkbox" value="0" name="newValues2[original_[{$langsel_right}]]" class="edittext" style="width: 100%;" disabled title="Original Oxid" [{$readonly}]>
</td>
<td class="edittext ext_edittext" align="left">&nbsp;</td>
</tr>
</table>
</fieldset>
</td>
</tr>
[{* Alteinträge *}]
<tr>
<td class="edittext ext_edittext" valign="top" align="left">
<fieldset>
<table cellspacing="0" cellpadding="0" border="0" width="100%">
<colgroup>
<col width="200">
<col>
<col width="26">
<col>
<col width="26">
<col width="26">
</colgroup>
[{foreach from=$aTranslations item=translation}]
<tr>
<td class="edittext ext_edittext">
<input type="text" size="50" name="value[[{$translation->key}]][key]" class="edittext" style="width: 100%;" value="[{$translation->key}]" onkeyup="document.getElementById('org_[{$translation->key}]').checked=false;" [{$readonly}]>
</td>
<td class="edittext ext_edittext" align="left">
<input type="text" size="50" name="value[[{$translation->key}]][[{$langsel_left}]]" class="edittext" style="width: 100%;" value="[{$translation->left}]" onkeyup="document.getElementById('org_[{$translation->key}]_[{$langsel_left}]').checked=false;" [{if $langsel_left == $langsel_right}] disabled[{/if}] [{$readonly}]>
</td>
<td class="edittext ext_edittext" align="left">
<input type="hidden" name="value[[{$translation->key}]][original_[{$langsel_left}]]" value="0">
<input type="checkbox" id="org_[{$translation->key}]_[{$langsel_left}][{if $langsel_left == $langsel_right}]wp[{/if}]" name="value[[{$translation->key}]][original_[{$langsel_left}][{if $langsel_left == $langsel_right}]wp[{/if}]]" class="edittext" value="1" style="width: 100%;" [{if $translation->original_left}]checked[{/if}] title="Original Oxid" [{if $langsel_left == $langsel_right}] disabled[{/if}] [{$readonly}]>
</td>
<td class="edittext ext_edittext" align="left">
<input type="text" size="50" name="value[[{$translation->key}]][[{$langsel_right}]]" class="edittext" style="width: 100%;" value="[{$translation->right}]" onkeyup="document.getElementById('org_[{$translation->key}]_[{$langsel_right}]').checked=false;" [{$readonly}]>
</td>
<td class="edittext ext_edittext" align="left">
<input type="hidden" name="value[[{$translation->key}]][original_[{$langsel_right}]]" value="0">
<input type="checkbox" id="org_[{$translation->key}]_[{$langsel_right}]" name="value[[{$translation->key}]][original_[{$langsel_right}]]" class="edittext" value="1" style="width: 100%;" [{if $translation->original_right}]checked[{/if}] title="Original Oxid" [{$readonly}]>
</td>
<td class="edittext ext_edittext" align="left">
<a id="del.2" class="delete" onmouseover="popUp(event,'item_delete');return true" onmouseout="popDown('item_delete')" title="" href="Javascript:DeleteThis('[{$translation->key}]');" [{$readonly}]>
</td>
</tr>
[{/foreach}]
</table>
</fieldset>
</td>
</tr>
[{* Speichern *}]
<tr>
<td class="edittext ext_edittext" valign="top" align="left">
<table width="100%">
<tr>
<td class="edittext ext_edittext" align="left"><br>
<span class="d3modcfg_btn icon d3color-green">
<button type="submit" name="save" [{$readonly}]>
<i class="fa fa-check-circle fa-inverse"></i>
[{oxmultilang ident="D3_CFG_MOD_GENERAL_SAVE"}]
</button>
</span>
</td>
</tr>
</table>
</td>
</tr>
</table>
</form>
[{/block}]
<table border="0" width="98%">
<tr>
<td class="edittext ext_edittext" valign="top" align="left">
[{include file="d3pagenavigation.tpl"}]
</td>
</tr>
</table>
[{else}]
[{* vorher Sprachwahl *}]
<table border="0" width="98%">
<tr>
<td class="edittext ext_edittext" valign="top" align="left">
<table width="100%">
<tr>
<td class="edittext ext_edittext" align="left"><br>
[{oxmultilang ident="D3_MULTILANG_CHOOSELANGFIRST"}]
</td>
</tr>
</table>
</td>
</tr>
</table>
[{/if}]
[{include file="d3_cfg_mod_inc.tpl"}]
[{block name="d3_cfg_multilang_main__clrtmp"}]
[{if $msg == 'success'}]
<script type="text/javascript">
if (confirm('[{oxmultilang ident="D3_MULTILANG_CLEARLANGCACHE"}]')) {
var oTransfer = parent.edit.document.getElementById("transfer");
oTransfer.fnc.value='clearLangCache';
oTransfer.submit();
}
</script>
[{elseif $msg == 'newFieldError'}]
<script type="text/javascript">
alert('[{oxmultilang ident="D3_MULTILANG_NEWFIELDERROR"}]');
</script>
[{/if}]
[{include file="headitem.tpl" title="GENERAL_ADMIN_TITLE"|oxmultilangassign}]
<script type="text/javascript">
<!--
function DeleteThis( sID)
{
blCheck = confirm("[{oxmultilang ident="GENERAL_YOUWANTTODELETE"}]");
if( blCheck === true)
{
var oTransfer = parent.edit.document.getElementById("transfer");
oTransfer.deloxid.value=sID;
oTransfer.fnc.value='deleteentry';
oTransfer.actedit.value=0;
oTransfer.submit();
}
}
function popUp(evt,currElem)
{
var popUpWin = document.getElementById(currElem);
var y = parseInt(evt.clientY) - 33 - parseInt((17.5*(popUpWin.innerHTML.split(/<br[ \/^>]*>/gi).length-1)));
var x = parseInt(evt.clientX) - 50;
if(document.all){
if ( x > document.body.clientWidth - 150 ){
x = parseInt(document.body.clientWidth) - 150;
y = y - 15;
}
}
else{
if ( x > self.innerWidth - 170 ){
x = parseInt(self.innerWidth) - 170;
}
}
popUpWin.style.top = Math.max(2,y)+'px';
popUpWin.style.left= Math.max(2,x)+'px';
popUpWin.style.visibility = "visible";
window.status = "";
}
function popDown(currElem)
{
var popUpWin = document.getElementById(currElem);
popUpWin.style.visibility ="hidden"
}
function _groupExp(el)
{
var _cur = el.parentNode;
if (_cur.className === "exp") _cur.className = "";
else _cur.className = "exp";
}
-->
</script>
<style type="text/css">
<!--
.ext_edittext {
padding: 2px;
}
fieldset{
border: 1px inset black;
background-color: #F0F0F0;
}
legend{
font-weight: bold;
}
dl dt{
font-weight: normal;
width: 55%;
}
.itemlist td {
padding: 0 5px;
}
-->
</style>
[{if $readonly}]
[{assign var="readonly" value="readonly disabled"}]
[{else}]
[{assign var="readonly" value=""}]
[{/if}]
<form name="transfer" id="transfer" action="[{$oViewConf->getSelfLink()}]" method="post">
[{$oViewConf->getHiddenSid()}]
<input type="hidden" name="oxid" value="[{$oxid}]">
<input type="hidden" name="deloxid" value="">
<input type="hidden" name="cl" value="[{$oViewConf->getActiveClassName()}]">
<input type="hidden" name="fnc" value="">
<input type="hidden" name="actedit" value="">
<input type="hidden" name="page" value="[{$iPage}]">
<input type="hidden" name="sSearchText" value="[{$sSearchText}]">
<input type="hidden" name="sSearchType" value="[{$sSearchType}]">
</form>
<table border="0" width="98%">
[{if $langsel_right != 'none' && $langsel_left != 'none'}]
[{* Suche *}]
<tr>
<td valign="top" class="edittext">
[{block name="d3_cfg_multilang_main__searchform"}]
<form name="searchform" id="searchform" action="[{$oViewConf->getSelfLink()}]" method="post">
[{$oViewConf->getHiddenSid()}]
<input type="hidden" name="cl" value="[{$oViewConf->getActiveClassName()}]">
<input type="hidden" name="fnc" value="languageselect">
<input type="hidden" name="oxid" value="[{$oxid}]">
<input type="hidden" name="lstrt" value="[{$lstrt}]">
<input type="hidden" name="sSearchType" id="sSearchType" value="default">
<input type="hidden" name="editval[d3_cfg_mod__oxid]" value="[{$oxid}]">
<fieldset>
<legend>[{oxmultilang ident="D3_MULTILANG_SEARCH"}]</legend>
<table cellspacing="0" cellpadding="0" border="0" width="100%">
<tr>
[{block name="d3_cfg_multilang_main__searchformelements"}]
<td class="edittext ext_edittext" style="width: 200px;">
<label for="sSearchText">[{oxmultilang ident="D3_MULTILANG_SEARCHDESC"}]</label>
</td>
<td class="edittext ext_edittext" align="left" colspan="2">
<input id="sSearchText" type="text" size="50" name="sSearchText" value="[{$sSearchText}]" class="edittext" style="margin-right: 5px; width: 250px; float: left;" [{$readonly}]>
<span class="d3modcfg_btn icon d3color-blue">
<button type="submit" name="save" [{$readonly}]>
<i class="fa fa-search"></i>
[{oxmultilang ident="D3_MULTILANG_SEARCHSTART"}]
</button>
</span>
</td>
</tr>
<tr>
<td colspan="2">
<div class="groupExp">
<div class="">
<a class="rc" onclick="_groupExp(this); return false;" href="#">
<span style="font-weight: bold;">
[{oxmultilang ident="D3_MULTILANG_SEARCH_FURTHER"}]
</span>
</a>
<dl>
<dt style="width: 1px;">
</dt>
<dd>
<span class="d3modcfg_btn icon d3color-blue" style="float: left; margin-right: 5px;">
<button type="submit" name="save" [{$readonly}] onclick="document.getElementById('sSearchType').value = 'emptyitems';">
<i class="fa fa-search"></i>
[{oxmultilang ident="D3_MULTILANG_SEARCHEMPTYSTART"}]
</button>
</span>
<span class="d3modcfg_btn icon d3color-blue" style="float: left; margin-right: 5px;">
<button type="submit" name="save" [{$readonly}] onclick="document.getElementById('sSearchType').value = 'identicalitems';">
<i class="fa fa-search"></i>
[{oxmultilang ident="D3_MULTILANG_SEARCHIDENTICALSTART"}]
</button>
</span>
<span class="d3modcfg_btn icon d3color-blue" style="float: left; margin-right: 5px;">
<button type="submit" name="save" [{$readonly}] onclick="document.getElementById('sSearchType').value = 'originalitems';">
<i class="fa fa-search"></i>
[{oxmultilang ident="D3_MULTILANG_SEARCHORIGINALSTART"}]
</button>
</span>
<select name="itemtype" size="1">
<option value="all">[{oxmultilang ident="D3_MULTILANG_SEARCHALL"}]</option>
<option value="frontend" [{if $sItemtype == 'frontend'}] selected[{/if}]>[{oxmultilang ident="D3_MULTILANG_SEARCHFRONTEND"}]</option>
<option value="backend" [{if $sItemtype == 'backend'}] selected[{/if}]>[{oxmultilang ident="D3_MULTILANG_SEARCHBACKEND"}]</option>
</select>
</dd>
</dl>
</div>
</div>
</td>
[{/block}]
</tr>
</table>
</fieldset>
</form>
[{/block}]
</td>
</tr>
[{/if}]
[{* Sprachwahl *}]
<tr>
<td valign="top" class="edittext">
[{block name="d3_cfg_multilang_main__langselection"}]
<form name="langsel" id="langsel" action="[{$oViewConf->getSelfLink()}]" method="post">
[{$oViewConf->getHiddenSid()}]
<input type="hidden" name="cl" value="[{$oViewConf->getActiveClassName()}]">
<input type="hidden" name="fnc" value="languageselect">
<input type="hidden" name="oxid" value="[{$oxid}]">
<input type="hidden" name="lstrt" value="[{$lstrt}]">
<input type="hidden" name="editval[d3_cfg_mod__oxid]" value="[{$oxid}]">
<fieldset>
<legend>[{oxmultilang ident="D3_MULTILANG_LANGSELECT"}]</legend>
<table cellspacing="0" cellpadding="0" border="0" width="100%">
<colgroup>
<col width="200">
<col>
<col width="26">
<col>
<col width="26">
<col width="26">
</colgroup>
<tr>
<td class="edittext ext_edittext">
&nbsp;
</td>
<td class="edittext ext_edittext" align="left">
<SELECT class="editinput" name="langsel[left]" size="1" style="width:100%; background-color: #F0F0F0; font-weight: bold; border-width:0;" onchange="document.getElementById('langsel').submit();">
<option value="">[{oxmultilang ident="D3_MULTILANG_SELECTLANGUAGE"}]</OPTION>
<option value="">---------------------------</OPTION>
[{foreach from=$aLanguages item=lang key=key}]
<option value="[{$lang->id}]" [{if $langsel_left == $lang->id && $langsel_left != 'none'}]selected[{/if}]>[{$lang->name}]</option>
[{/foreach}]
</SELECT>
</td>
<td class="edittext ext_edittext" align="left">&nbsp;</td>
<td class="edittext ext_edittext" align="left">
<SELECT class="editinput" name="langsel[right]" size="1" style="width:100%; background-color: #F0F0F0; font-weight: bold; border-width:0;" onchange="document.getElementById('langsel').submit();">
<option value="">[{oxmultilang ident="D3_MULTILANG_SELECTLANGUAGE"}]</OPTION>
<option value="">---------------------------</OPTION>
[{foreach from=$aLanguages item=lang key=key}]
<option value="[{$lang->id}]" [{if $langsel_right == $lang->id && $langsel_right != 'none'}]selected[{/if}]>[{$lang->name}]</option>
[{/foreach}]
</SELECT>
</td>
<td class="edittext ext_edittext" align="left">&nbsp;</td>
<td class="edittext ext_edittext" align="left">&nbsp;</td>
</tr>
</table>
</fieldset>
</form>
[{/block}]
</td>
</tr>
</table>
[{if $langsel_right != 'none' && $langsel_left != 'none'}]
[{* Neueinträge *}]
[{block name="d3_cfg_multilang_main__newitems"}]
<form name="myedit" id="myedit" action="[{$oViewConf->getSelfLink()}]" method="post">
[{$oViewConf->getHiddenSid()}]
<input type="hidden" name="cl" value="[{$oViewConf->getActiveClassName()}]">
<input type="hidden" name="fnc" value="save">
<input type="hidden" name="oxid" value="[{$oxid}]">
<input type="hidden" name="lstrt" value="[{$lstrt}]">
<input type="hidden" name="editval[d3_cfg_mod__oxid]" value="[{$oxid}]">
<input type="hidden" name="sSearchText" value="[{$sSearchText}]">
<input type="hidden" name="sSearchType" value="[{$sSearchType}]">
<input type="hidden" name="page" value="[{$iPage}]">
<table border="0" width="98%" class="itemlist">
<tr>
<td class="edittext ext_edittext" valign="top" align="left">
<fieldset>
<legend>[{oxmultilang ident="D3_MULTILANG_NEWITEM"}]</legend>
<table cellspacing="0" cellpadding="0" border="0" width="100%">
<colgroup>
<col width="200">
<col>
<col width="26">
<col>
<col width="26">
<col width="26">
</colgroup>
<tr>
<td class="edittext ext_edittext">
<input type="text" name="newValues1[key]" class="edittext" value="[{$newValues1.key}]" style="width: 100%;[{if $newValues1.error}] border: 2px solid red;[{/if}]" [{$readonly}]>
</td>
<td class="edittext ext_edittext" align="left">
<input type="text" size="50" name="newValues1[[{$langsel_left}]]" value="[{$newValues1.$langsel_left}]" class="edittext" style="width: 100%;[{if $newValues1.error}] border: 2px solid red;[{/if}]"[{if $langsel_left == $langsel_right}] disabled[{/if}] [{$readonly}]>
</td>
<td class="edittext ext_edittext" align="left">
<input type="checkbox" value="0" name="newValues1[original_[{$langsel_left}]]" class="edittext" style="width: 100%;" disabled title="Original Oxid" [{$readonly}]>
</td>
<td class="edittext ext_edittext" align="left">
<input type="text" size="50" name="newValues1[[{$langsel_right}]]" value="[{$newValues1.$langsel_right}]" class="edittext" style="width: 100%;[{if $newValues1.error}] border: 2px solid red;[{/if}]" [{$readonly}]>
</td>
<td class="edittext ext_edittext" align="left">
<input type="checkbox" value="0" name="newValues1[original_[{$langsel_right}]]" class="edittext" style="width: 100%;" disabled title="Original Oxid" [{$readonly}]>
</td>
<td class="edittext ext_edittext" align="left">&nbsp;</td>
</tr>
<tr>
<td class="edittext ext_edittext">
<input type="text" name="newValues2[key]" class="edittext" value="[{$newValues2.key}]" style="width: 100%;[{if $newValues2.error}] border: 2px solid red;[{/if}]" [{$readonly}]>
</td>
<td class="edittext ext_edittext" align="left">
<input type="text" size="50" name="newValues2[[{$langsel_left}]]" value="[{$newValues2.$langsel_left}]" class="edittext" style="width: 100%;[{if $newValues2.error}] border: 2px solid red;[{/if}]"[{if $langsel_left == $langsel_right}] disabled[{/if}] [{$readonly}]>
</td>
<td class="edittext ext_edittext" align="left">
<input type="checkbox" value="0" name="newValues2[original_[{$langsel_left}]]" class="edittext" style="width: 100%;" disabled title="Original Oxid" [{$readonly}]>
</td>
<td class="edittext ext_edittext" align="left">
<input type="text" size="50" name="newValues2[[{$langsel_right}]]" value="[{$newValues2.$langsel_right}]" class="edittext" style="width: 100%;[{if $newValues2.error}] border: 2px solid red;[{/if}]" [{$readonly}]>
</td>
<td class="edittext ext_edittext" align="left">
<input type="checkbox" value="0" name="newValues2[original_[{$langsel_right}]]" class="edittext" style="width: 100%;" disabled title="Original Oxid" [{$readonly}]>
</td>
<td class="edittext ext_edittext" align="left">&nbsp;</td>
</tr>
</table>
</fieldset>
</td>
</tr>
[{* Alteinträge *}]
<tr>
<td class="edittext ext_edittext" valign="top" align="left">
<fieldset>
<table cellspacing="0" cellpadding="0" border="0" width="100%">
<colgroup>
<col width="200">
<col>
<col width="26">
<col>
<col width="26">
<col width="26">
</colgroup>
[{foreach from=$aTranslations item=translation}]
<tr>
<td class="edittext ext_edittext">
<input type="text" size="50" name="value[[{$translation->key}]][key]" class="edittext" style="width: 100%;" value="[{$translation->key}]" onkeyup="document.getElementById('org_[{$translation->key}]').checked=false;" [{$readonly}]>
</td>
<td class="edittext ext_edittext" align="left">
<input type="text" size="50" name="value[[{$translation->key}]][[{$langsel_left}]]" class="edittext" style="width: 100%;" value="[{$translation->left}]" onkeyup="document.getElementById('org_[{$translation->key}]_[{$langsel_left}]').checked=false;" [{if $langsel_left == $langsel_right}] disabled[{/if}] [{$readonly}]>
</td>
<td class="edittext ext_edittext" align="left">
<input type="hidden" name="value[[{$translation->key}]][original_[{$langsel_left}]]" value="0">
<input type="checkbox" id="org_[{$translation->key}]_[{$langsel_left}][{if $langsel_left == $langsel_right}]wp[{/if}]" name="value[[{$translation->key}]][original_[{$langsel_left}][{if $langsel_left == $langsel_right}]wp[{/if}]]" class="edittext" value="1" style="width: 100%;" [{if $translation->original_left}]checked[{/if}] title="Original Oxid" [{if $langsel_left == $langsel_right}] disabled[{/if}] [{$readonly}]>
</td>
<td class="edittext ext_edittext" align="left">
<input type="text" size="50" name="value[[{$translation->key}]][[{$langsel_right}]]" class="edittext" style="width: 100%;" value="[{$translation->right}]" onkeyup="document.getElementById('org_[{$translation->key}]_[{$langsel_right}]').checked=false;" [{$readonly}]>
</td>
<td class="edittext ext_edittext" align="left">
<input type="hidden" name="value[[{$translation->key}]][original_[{$langsel_right}]]" value="0">
<input type="checkbox" id="org_[{$translation->key}]_[{$langsel_right}]" name="value[[{$translation->key}]][original_[{$langsel_right}]]" class="edittext" value="1" style="width: 100%;" [{if $translation->original_right}]checked[{/if}] title="Original Oxid" [{$readonly}]>
</td>
<td class="edittext ext_edittext" align="left">
<a id="del.2" class="delete" onmouseover="popUp(event,'item_delete');return true" onmouseout="popDown('item_delete')" title="" href="Javascript:DeleteThis('[{$translation->key}]');" [{$readonly}]>
</td>
</tr>
[{/foreach}]
</table>
</fieldset>
</td>
</tr>
[{* Speichern *}]
<tr>
<td class="edittext ext_edittext" valign="top" align="left">
<table width="100%">
<tr>
<td class="edittext ext_edittext" align="left"><br>
<span class="d3modcfg_btn icon d3color-green">
<button type="submit" name="save" [{$readonly}]>
<i class="fa fa-check-circle fa-inverse"></i>
[{oxmultilang ident="D3_CFG_MOD_GENERAL_SAVE"}]
</button>
</span>
</td>
</tr>
</table>
</td>
</tr>
</table>
</form>
[{/block}]
<table border="0" width="98%">
<tr>
<td class="edittext ext_edittext" valign="top" align="left">
[{include file="d3pagenavigation.tpl"}]
</td>
</tr>
</table>
[{else}]
[{* vorher Sprachwahl *}]
<table border="0" width="98%">
<tr>
<td class="edittext ext_edittext" valign="top" align="left">
<table width="100%">
<tr>
<td class="edittext ext_edittext" align="left"><br>
[{oxmultilang ident="D3_MULTILANG_CHOOSELANGFIRST"}]
</td>
</tr>
</table>
</td>
</tr>
</table>
[{/if}]
[{include file="d3_cfg_mod_inc.tpl"}]
[{block name="d3_cfg_multilang_main__clrtmp"}]
[{if $msg == 'success'}]
<script type="text/javascript">
if (confirm('[{oxmultilang ident="D3_MULTILANG_CLEARLANGCACHE"}]')) {
var oTransfer = parent.edit.document.getElementById("transfer");
oTransfer.fnc.value='clearLangCache';
oTransfer.submit();
}
</script>
[{elseif $msg == 'newFieldError'}]
<script type="text/javascript">
alert('[{oxmultilang ident="D3_MULTILANG_NEWFIELDERROR"}]');
</script>
[{/if}]
[{/block}]

View File

@ -1,17 +1,17 @@
<?php
$sLangName = "[{$sLangName}]";
// -------------------------------
// RESOURCE IDENTITFIER = STRING
// -------------------------------
$aLang = array(
//Navigation
[{foreach from=$aTranslations item="translation" key="ident"}]
[{strip}]
[{capture assign="sIdent"}][{$encloser}][{$ident}][{$encloser}][{/capture}]
[{$sIdent|str_pad:$maxIdentLength:' ':1}] => [{$encloser}][{$translation}][{$encloser}],
[{/strip}]
[{/foreach}]
);
<?php
$sLangName = "[{$sLangName}]";
// -------------------------------
// RESOURCE IDENTITFIER = STRING
// -------------------------------
$aLang = array(
//Navigation
[{foreach from=$aTranslations item="translation" key="ident"}]
[{strip}]
[{capture assign="sIdent"}][{$encloser}][{$ident}][{$encloser}][{/capture}]
[{$sIdent|str_pad:$maxIdentLength:' ':1}] => [{$encloser}][{$translation}][{$encloser}],
[{/strip}]
[{/foreach}]
);

View File

@ -1,37 +1,37 @@
<?php
/**
* This Software is the property of Data Development and is protected
* by copyright law - it is NOT Freeware.
*
* Any unauthorized use of this software without a valid license
* is a violation of the license agreement and will be prosecuted by
* civil and criminal law.
*
* http://www.shopmodule.com
*
* @copyright (C) D3 Data Development (Inh. Thomas Dartsch)
* @author D3 Data Development - Daniel Seifert <support@shopmodule.com>
* @link http://www.oxidmodule.com
*/
namespace D3\Multilang\Modules\Application\Controller\Admin
{
class d3_navigation_multilang_parent extends \OxidEsales\Eshop\Application\Controller\Admin\NavigationController {}
class d3_sysreq_main_multilang_parent extends \OxidEsales\Eshop\Application\Controller\Admin\SystemRequirementsMain {}
class d3cleartmp_multilang_parent extends \D3\ModCfg\Application\Controller\Admin\Maintenance\d3cleartmp {}
}
namespace D3\Multilang\Modules\Application\Model\Maintenance
{
class d3clrtmp_multilang_parent extends \D3\ModCfg\Application\Model\Maintenance\d3clrtmp {}
}
namespace D3\Multilang\Modules\Core
{
class d3_oxlang_multilang_parent extends \OxidEsales\Eshop\Core\Language {}
class d3_oxsysrequirements_multilang_parent extends \OxidEsales\Eshop\Core\SystemRequirements {}
<?php
/**
* This Software is the property of Data Development and is protected
* by copyright law - it is NOT Freeware.
*
* Any unauthorized use of this software without a valid license
* is a violation of the license agreement and will be prosecuted by
* civil and criminal law.
*
* http://www.shopmodule.com
*
* @copyright (C) D3 Data Development (Inh. Thomas Dartsch)
* @author D3 Data Development - Daniel Seifert <support@shopmodule.com>
* @link http://www.oxidmodule.com
*/
namespace D3\Multilang\Modules\Application\Controller\Admin
{
class d3_navigation_multilang_parent extends \OxidEsales\Eshop\Application\Controller\Admin\NavigationController {}
class d3_sysreq_main_multilang_parent extends \OxidEsales\Eshop\Application\Controller\Admin\SystemRequirementsMain {}
class d3cleartmp_multilang_parent extends \D3\ModCfg\Application\Controller\Admin\Maintenance\d3cleartmp {}
}
namespace D3\Multilang\Modules\Application\Model\Maintenance
{
class d3clrtmp_multilang_parent extends \D3\ModCfg\Application\Model\Maintenance\d3clrtmp {}
}
namespace D3\Multilang\Modules\Core
{
class d3_oxlang_multilang_parent extends \OxidEsales\Eshop\Core\Language {}
class d3_oxsysrequirements_multilang_parent extends \OxidEsales\Eshop\Core\SystemRequirements {}
}

View File

@ -1,30 +1,30 @@
<?php
namespace D3\Multilang\Modules\Application\Controller\Admin;
/**
* This Software is the property of Data Development and is protected
* by copyright law - it is NOT Freeware.
* Any unauthorized use of this software without a valid license
* is a violation of the license agreement and will be prosecuted by
* civil and criminal law.
* http://www.shopmodule.com
*
* @copyright (C) D3 Data Development (Inh. Thomas Dartsch)
* @author D3 Data Development - Daniel Seifert <support@shopmodule.com>
* @link http://www.oxidmodule.com
*/
class d3_sysreq_main_multilang extends d3_sysreq_main_multilang_parent
{
public function render()
{
$sRet = parent::render();
$aCollations = $this->_aViewData['aCollations'];
unset($aCollations['d3_translations']);
$this->_aViewData['aCollations'] = $aCollations;
return $sRet;
}
<?php
namespace D3\Multilang\Modules\Application\Controller\Admin;
/**
* This Software is the property of Data Development and is protected
* by copyright law - it is NOT Freeware.
* Any unauthorized use of this software without a valid license
* is a violation of the license agreement and will be prosecuted by
* civil and criminal law.
* http://www.shopmodule.com
*
* @copyright (C) D3 Data Development (Inh. Thomas Dartsch)
* @author D3 Data Development - Daniel Seifert <support@shopmodule.com>
* @link http://www.oxidmodule.com
*/
class d3_sysreq_main_multilang extends d3_sysreq_main_multilang_parent
{
public function render()
{
$sRet = parent::render();
$aCollations = $this->_aViewData['aCollations'];
unset($aCollations['d3_translations']);
$this->_aViewData['aCollations'] = $aCollations;
return $sRet;
}
}

View File

@ -1,71 +1,71 @@
<?php
namespace D3\Multilang\Modules\Application\Controller\Admin;
use D3\ModCfg\Application\Model\Configuration\d3_cfg_mod;
use D3\Multilang\Application\Model\d3_translations;
use Doctrine\DBAL\DBALException;
use OxidEsales\Eshop\Core\Exception\DatabaseConnectionException;
use OxidEsales\Eshop\Core\Exception\DatabaseErrorException;
use OxidEsales\Eshop\Core\Exception\StandardException;
use OxidEsales\Eshop\Core\Registry;
use OxidEsales\Eshop\Core\UtilsView;
/**
* This Software is the property of Data Development and is protected
* by copyright law - it is NOT Freeware.
* Any unauthorized use of this software without a valid license
* is a violation of the license agreement and will be prosecuted by
* civil and criminal law.
* http://www.shopmodule.com
*
* @copyright (C) D3 Data Development (Inh. Thomas Dartsch)
* @author D3 Data Development - Daniel Seifert <support@shopmodule.com>
* @link http://www.oxidmodule.com
*/
class d3cleartmp_multilang extends d3cleartmp_multilang_parent
{
protected $_sMultiLangModId = 'd3_multilang';
/**
* @return string
*/
protected function _d3GetMultiLangModId()
{
return $this->_sMultiLangModId;
}
/**
* @return bool|d3_cfg_mod|false
* @throws DBALException
* @throws DatabaseConnectionException
* @throws DatabaseErrorException
*/
public function d3GetMultiLangSet()
{
return d3_cfg_mod::get($this->_d3GetMultiLangModId());
}
public function clearTmp()
{
$blReturn = false;
if ($this->d3GetMultiLangSet()->isActive()) {
if (!Registry::getRequest()->getRequestEscapedParameter('clearall')) {
if (Registry::getRequest()->getRequestEscapedParameter('importmultilang')) {
$this->addTplParam('importMultilang', true);
/** @var d3_translations $oTranslation */
$oTranslation = oxNew(d3_translations::class);
$oTranslation->importInstalled();
}
}
if ($blReturn) {
Registry::get(UtilsView::class)->addErrorToDisplay(new StandardException('D3_CFG_CLRTMP_SUCCESS'));
}
}
parent::clearTmp();
}
}
<?php
namespace D3\Multilang\Modules\Application\Controller\Admin;
use D3\ModCfg\Application\Model\Configuration\d3_cfg_mod;
use D3\Multilang\Application\Model\d3_translations;
use Doctrine\DBAL\DBALException;
use OxidEsales\Eshop\Core\Exception\DatabaseConnectionException;
use OxidEsales\Eshop\Core\Exception\DatabaseErrorException;
use OxidEsales\Eshop\Core\Exception\StandardException;
use OxidEsales\Eshop\Core\Registry;
use OxidEsales\Eshop\Core\UtilsView;
/**
* This Software is the property of Data Development and is protected
* by copyright law - it is NOT Freeware.
* Any unauthorized use of this software without a valid license
* is a violation of the license agreement and will be prosecuted by
* civil and criminal law.
* http://www.shopmodule.com
*
* @copyright (C) D3 Data Development (Inh. Thomas Dartsch)
* @author D3 Data Development - Daniel Seifert <support@shopmodule.com>
* @link http://www.oxidmodule.com
*/
class d3cleartmp_multilang extends d3cleartmp_multilang_parent
{
protected $_sMultiLangModId = 'd3_multilang';
/**
* @return string
*/
protected function _d3GetMultiLangModId()
{
return $this->_sMultiLangModId;
}
/**
* @return bool|d3_cfg_mod|false
* @throws DBALException
* @throws DatabaseConnectionException
* @throws DatabaseErrorException
*/
public function d3GetMultiLangSet()
{
return d3_cfg_mod::get($this->_d3GetMultiLangModId());
}
public function clearTmp()
{
$blReturn = false;
if ($this->d3GetMultiLangSet()->isActive()) {
if (!Registry::getRequest()->getRequestEscapedParameter('clearall')) {
if (Registry::getRequest()->getRequestEscapedParameter('importmultilang')) {
$this->addTplParam('importMultilang', true);
/** @var d3_translations $oTranslation */
$oTranslation = oxNew(d3_translations::class);
$oTranslation->importInstalled();
}
}
if ($blReturn) {
Registry::get(UtilsView::class)->addErrorToDisplay(new StandardException('D3_CFG_CLRTMP_SUCCESS'));
}
}
parent::clearTmp();
}
}

View File

@ -1,46 +1,46 @@
<?php
/**
* This Software is the property of Data Development and is protected
* by copyright law - it is NOT Freeware.
*
* Any unauthorized use of this software without a valid license
* is a violation of the license agreement and will be prosecuted by
* civil and criminal law.
*
* http://www.shopmodule.com
*
* @copyright (C) D3 Data Development (Inh. Thomas Dartsch)
* @author D3 Data Development - Daniel Seifert <support@shopmodule.com>
* @link http://www.oxidmodule.com
*/
namespace D3\Multilang\Setup;
use D3\ModCfg\Application\Model\Exception\d3ShopCompatibilityAdapterException;
use D3\ModCfg\Application\Model\Install\d3install;
use Doctrine\DBAL\DBALException;
use OxidEsales\Eshop\Core\Exception\DatabaseConnectionException;
use OxidEsales\Eshop\Core\Exception\DatabaseErrorException;
use OxidEsales\Eshop\Core\Exception\StandardException;
use OxidEsales\Eshop\Core\Exception\SystemComponentException;
class Events
{
/**
* @throws d3ShopCompatibilityAdapterException
* @throws DBALException
* @throws DatabaseConnectionException
* @throws DatabaseErrorException
* @throws StandardException
* @throws SystemComponentException
*/
public static function onActivate()
{
d3install::checkUpdateStart();
}
public static function onDeactivate()
{
}
<?php
/**
* This Software is the property of Data Development and is protected
* by copyright law - it is NOT Freeware.
*
* Any unauthorized use of this software without a valid license
* is a violation of the license agreement and will be prosecuted by
* civil and criminal law.
*
* http://www.shopmodule.com
*
* @copyright (C) D3 Data Development (Inh. Thomas Dartsch)
* @author D3 Data Development - Daniel Seifert <support@shopmodule.com>
* @link http://www.oxidmodule.com
*/
namespace D3\Multilang\Setup;
use D3\ModCfg\Application\Model\Exception\d3ShopCompatibilityAdapterException;
use D3\ModCfg\Application\Model\Install\d3install;
use Doctrine\DBAL\DBALException;
use OxidEsales\Eshop\Core\Exception\DatabaseConnectionException;
use OxidEsales\Eshop\Core\Exception\DatabaseErrorException;
use OxidEsales\Eshop\Core\Exception\StandardException;
use OxidEsales\Eshop\Core\Exception\SystemComponentException;
class Events
{
/**
* @throws d3ShopCompatibilityAdapterException
* @throws DBALException
* @throws DatabaseConnectionException
* @throws DatabaseErrorException
* @throws StandardException
* @throws SystemComponentException
*/
public static function onActivate()
{
d3install::checkUpdateStart();
}
public static function onDeactivate()
{
}
}

View File

@ -1,472 +1,472 @@
<?php
namespace D3\Multilang\Setup;
use D3\ModCfg\Application\Model\d3database;
use D3\ModCfg\Application\Model\Exception\d3_cfg_mod_exception;
use D3\ModCfg\Application\Model\Exception\d3ParameterNotFoundException;
use D3\ModCfg\Application\Model\Exception\d3ShopCompatibilityAdapterException;
use D3\ModCfg\Application\Model\Install\d3install_updatebase;
use D3\ModCfg\Application\Model\Installwizzard\d3installconfirmmessage;
use D3\ModCfg\Application\Model\Installwizzard\d3installdbcommon;
use D3\Multilang\Application\Model\d3_translations;
use Doctrine\DBAL\DBALException;
use OxidEsales\Eshop\Application\Model\Shop;
use OxidEsales\Eshop\Core\DatabaseProvider;
use OxidEsales\Eshop\Core\Exception\ConnectionException;
use OxidEsales\Eshop\Core\Exception\DatabaseConnectionException;
use OxidEsales\Eshop\Core\Exception\DatabaseErrorException;
use OxidEsales\Eshop\Core\Exception\StandardException;
use OxidEsales\Eshop\Core\Registry;
use ReflectionException;
/**
* This Software is the property of Data Development and is protected
* by copyright law - it is NOT Freeware.
*
* Any unauthorized use of this software without a valid license
* is a violation of the license agreement and will be prosecuted by
* civil and criminal law.
*
* http://www.shopmodule.com
*
* @copyright (C) D3 Data Development (Inh. Thomas Dartsch)
* @author D3 Data Development - Daniel Seifert <support@shopmodule.com>
* @link http://www.oxidmodule.com
*/
class d3multilang_update extends d3install_updatebase
{
public $sModKey = 'd3_multilang';
public $sModName = 'Übersetzungsassistent';
public $sModVersion = '4.0.0.1';
public $sModRevision = '4001';
public $sBaseConf = 'b1av2==aGNOa0hIWDFTaGVGdUhSdysxSjB6SVowWUdyWFhWMGFXS2NpYktnKzlkN2ZnNG03MndET2RuW
nNPVnFudmFUU2d1WnNTV1hCNk5odUg5S1FXdnZIS3IvWTgvVnpOZVhmSzcyZW1JMHVJa0JJNkZEbjJCT
EY1RmEzaG5TUGNiSkRCTVVVK2kya2d5SDl4aTQ4R28waHlxUFBPVzhkQnM4Y0k3alZtYTVaTlFlYXVFV
0NxSGI5a2pnRTdzc2NFMEF2T3pSOW9zbG5EV01TLzU3UGEvZGRRcEZLeXNhNDMvQVV4YnVpN1c2czFad
VRmcHU5c3htT2lJRVhIVGxrK1RJOUczdEwzZjJNSnJGQ21iamhaR2w5QU9UemdKQUVxcU5CQWhCMnFyL
09ybjB5cWp0MTM5VUQ1K05rVmVGNkE5UUdQa3RKcXpyNkpEbWNuMGdCWDVZSG9nPT0=';
public $sRequirements = '';
public $sBaseValue = 'TyUzQTglM0ElMjJzdGRDbGFzcyUyMiUzQTQlM0ElN0JzJTNBMjglM0ElMjJkM19jZmdfbW9kX19hTGljZW5zZUluZm9NYWlsJTIyJTNCYSUzQTIlM0ElN0JzJTNBNDglM0ElMjJVTktOT1dOQ09ORktFWV9fNDc5MzYzODcwMmI2NzcxNWYxZGZiZmM4MzI0NjY5MTQlMjIlM0JzJTNBMTklM0ElMjIyMDEzLTEwLTE3JTIwMDklM0EzOSUzQTUyJTIyJTNCcyUzQTQyJTNBJTIyTk9MSUNLRVlfXzQ3OTM2Mzg3MDJiNjc3MTVmMWRmYmZjODMyNDY2OTE0JTIyJTNCcyUzQTE5JTNBJTIyMjAxMy0xMC0xNyUyMDA5JTNBNDElM0EyNyUyMiUzQiU3RHMlM0EzOCUzQSUyMmQzX2NmZ19tb2RfX2JsTXVsdGlsYW5nX091dHB1dE1pbWVUeXBlJTIyJTNCcyUzQTElM0ElMjIxJTIyJTNCcyUzQTMyJTNBJTIyZDNfY2ZnX21vZF9fc011bHRpbGFuZ19TZXBhcmF0b3IlMjIlM0JzJTNBMSUzQSUyMiU3QyUyMiUzQnMlM0E0MCUzQSUyMmQzX2NmZ19tb2RfX2JsTXVsdGlsYW5nX1NhdmVNaXNzaW5nSXRlbXMlMjIlM0JzJTNBMSUzQSUyMjElMjIlM0IlN0Q=';
protected $_aUpdateMethods = array(
array('check' => 'checkModCfgItemExist',
'do' => 'updateModCfgItemExist'),
array('check' => 'checkRenameFields',
'do' => 'fixRenameFields'),
array('check' => 'checkDeleteFields',
'do' => 'fixDeleteFields'),
array('check' => 'checkTranslationTableExist',
'do' => 'updateTranslationTableExist'),
array('check' => 'checkFields',
'do' => 'fixFields'),
array('check' => 'checkIdentCollation',
'do' => 'fixIdentCollation'),
array('check' => 'checkIndizes',
'do' => 'fixIndizes'),
array('check' => 'checkFieldsCollation',
'do' => 'fixFieldsCollation'),
array('check' => 'checkMultiLangDbItemsNotExist',
'do' => 'importMultiLangItems'),
array('check' => 'hasUnregisteredFiles',
'do' => 'showUnregisteredFiles'),
array('check' => 'checkModCfgSameRevision',
'do' => 'updateModCfgSameRevision'),
);
public $aFields = array(
'OXID' => array(
'sTableName' => 'd3_translations',
'sFieldName' => 'OXID',
'sType' => 'VARCHAR(100)',
'blNull' => false,
'sDefault' => false,
'sComment' => '',
'sExtra' => '',
'blMultilang' => false,
),
'OXTEXT' => array(
'sTableName' => 'd3_translations',
'sFieldName' => 'OXTEXT',
'sType' => 'TEXT',
'blNull' => false,
'sDefault' => false,
'sComment' => '',
'sExtra' => '',
'blMultilang' => true,
'sForceCollation' => 'utf8_general_ci'
),
'OXORIGINAL' => array(
'sTableName' => 'd3_translations',
'sFieldName' => 'OXORIGINAL',
'sType' => 'TINYINT(1)',
'blNull' => false,
'sDefault' => '0',
'sComment' => 'item is modified',
'sExtra' => '',
'blMultilang' => true,
),
'OXSTRING' => array(
'sTableName' => 'd3_translations',
'sFieldName' => 'OXSTRING',
'sType' => 'TINYINT(1)',
'blNull' => false,
'sDefault' => '1',
'sComment' => 'item ist string or serialized structure',
'sExtra' => '',
'blMultilang' => false,
),
'OXADMIN' => array(
'sTableName' => 'd3_translations',
'sFieldName' => 'OXADMIN',
'sType' => 'TINYINT(1)',
'blNull' => false,
'sDefault' => '0',
'sComment' => 'item is used in admin panel',
'sExtra' => '',
'blMultilang' => false,
),
);
public $aIndizes = array(
'OXID' => array(
'sTableName' => 'd3_translations',
'sType' => d3database::INDEX_TYPE_PRIMARY,
'sName' => 'OXID',
'aFields' => array(
'OXID' => 'OXID',
'OXADMIN' => 'OXADMIN',
),
),
);
public $aRenameFields = array(
'OXID' => array(
'sTableName' => 'd3_translations',
'mOldFieldNames' => array('oxident', 'OXIDENT'), // is case sensitive
'sFieldName' => 'OXID',
'blMultilang' => false,
),
'OXTEXT_0' => array(
'sTableName' => 'd3_translations',
'mOldFieldNames' => array('oxtext', 'oxtext_0'), // is case sensitive
'sFieldName' => 'OXTEXT',
'blMultilang' => false,
),
'OXTEXT' => array(
'sTableName' => 'd3_translations',
'mOldFieldNames' => array('oxtext'), // is case sensitive
'sFieldName' => 'OXTEXT',
'blMultilang' => true,
),
'OXORIGINAL' => array(
'sTableName' => 'd3_translations',
'mOldFieldNames' => array('oxoriginal'), // is case sensitive
'sFieldName' => 'OXORIGINAL',
'blMultilang' => false,
),
);
public $aDeleteFields = array(
'OXISSET' => array(
'sTableName' => 'd3_translations',
'sFieldName' => 'oxisset',
'blMultilang' => false,
),
);
protected $_aRefreshMetaModuleIds = array('d3_multilang');
/**
* @return bool
* @throws DBALException
* @throws DatabaseConnectionException
* @throws DatabaseErrorException
*/
public function checkTranslationTableExist()
{
return $this->_checkTableNotExist('d3_translations');
}
/**
* @return bool
* @throws ConnectionException
* @throws DBALException
* @throws DatabaseConnectionException
* @throws DatabaseErrorException
*/
public function updateTranslationTableExist()
{
$blRet = false;
if ($this->checkTranslationTableExist()) {
$this->setInitialExecMethod(__METHOD__);
$blRet = $this->_addTable2('d3_translations', $this->aFields, $this->aIndizes, 'D3 multilang', 'MyISAM');
}
return $blRet;
}
/**
* @return bool
* @throws DatabaseConnectionException
* @throws d3ParameterNotFoundException
*/
public function checkIdentCollation()
{
$sFieldCollation = $this->_getIdentCollation();
$sPattern = '@.*_cs|.*_bin@';
return false == preg_match($sPattern, $sFieldCollation);
}
/**
* @return bool
* @throws DBALException
* @throws DatabaseConnectionException
* @throws DatabaseErrorException
* @throws d3ParameterNotFoundException
*/
public function fixIdentCollation()
{
$sFieldIdent = 'OXID';
$sFieldCollation = $this->_getIdentCollation();
$sGeneralPattern = '@(.*)_ci@';
preg_match($sGeneralPattern, $sFieldCollation, $aGeneralMatches);
$sBinPattern = '@(.*)_general_ci@';
preg_match($sBinPattern, $sFieldCollation, $aBinMatches);
$oDatabase = $this->_getDatabaseHandler();
$sAvailableCollationSelect = "SHOW COLLATION WHERE Collation IN(
'".$aGeneralMatches[1]."_cs', 'utf8_general_cs', 'latin1_general_cs',
'".$aBinMatches[1]."_bin', 'utf8_bin', 'latin1_bin'
)";
$aAvailableCollations = DatabaseProvider::getDb(DatabaseProvider::FETCH_MODE_ASSOC)->getAll($sAvailableCollationSelect);
usort($aAvailableCollations, array($this, 'sortCollations'));
if (count($aAvailableCollations)) {
$sSelect = 'ALTER TABLE `'.$this->aFields[$sFieldIdent]['sTableName'].'` CHANGE `'.
$this->aFields[$sFieldIdent]['sFieldName'].'` `'.$this->aFields[$sFieldIdent]['sFieldName'].'` '.
$this->aFields[$sFieldIdent]['sType'].' CHARACTER SET '.$oDatabase->getBaseCharset().
' COLLATE '.$aAvailableCollations[0]['Collation'].' NOT NULL;';
$this->setActionLog(
'SQL',
$sSelect,
$this->getInitialExecMethod(__METHOD__)
);
/** @var d3installdbcommon $oDbCommon */
$oDbCommon = oxNew(d3installdbcommon::class, $this);
$blRet = $oDbCommon->tableSqlExecute($sSelect, $this->aFields[$sFieldIdent]['sTableName'], false);
} else {
/** @var d3installconfirmmessage $oMessage */
$sMessage = sprintf(
Registry::getLang()->translateString('D3_MULTILANG_INSTALL_NOCSCOLLATION'),
$this->aFields[$sFieldIdent]['sFieldName'],
$this->aFields[$sFieldIdent]['sTableName']
);
$oMessage = oxNew(d3installconfirmmessage::class, $this);
$blRet = $oMessage->confirmCustomMessage($sMessage);
}
return $blRet;
}
/**
* @param $a
* @param $b
*
* @return int
* @throws DBALException
* @throws DatabaseConnectionException
*/
public function sortCollations($a, $b)
{
$oDatabase = $this->_getDatabaseHandler();
$sBaseCharset = $oDatabase->getBaseCharset();
if ($a['Charset'] == $sBaseCharset && $b['Charset'] != $sBaseCharset) {
return -1;
} elseif ($a['Charset'] != $sBaseCharset && $b['Charset'] == $sBaseCharset) {
return 1;
}
if (strstr($a['Collation'], '_general_cs') && !strstr($b['Collation'], '_general_cs')) {
return -1;
} elseif (!strstr($a['Collation'], '_general_cs') && strstr($b['Collation'], '_general_cs')) {
return 1;
}
return 0;
}
/**
* @return string
* @throws DatabaseConnectionException
* @throws d3ParameterNotFoundException
*/
protected function _getIdentCollation()
{
if ($this->getCacheHandler()->has(__METHOD__)) {
return $this->getCacheHandler()->get(__METHOD__);
}
startProfile(__METHOD__);
$myConfig = Registry::getConfig();
$sSelect = 'select c.COLLATION_NAME from INFORMATION_SCHEMA.tables t ' .
'LEFT JOIN INFORMATION_SCHEMA.columns c ON t.TABLE_NAME = c.TABLE_NAME ' .
'where t.TABLE_SCHEMA = "' . $myConfig->getConfigParam('dbName') . '" ' .
'and t.TABLE_NAME = "d3_translations" ' .
'and c.TABLE_SCHEMA = "' . $myConfig->getConfigParam('dbName') . '" ' .
'and c.COLUMN_NAME = "OXID" ' .
' LIMIT 1';
$sCollation = DatabaseProvider::getDb(DatabaseProvider::FETCH_MODE_ASSOC)->getOne($sSelect);
$this->getCacheHandler()->set(__METHOD__, $sCollation);
stopProfile(__METHOD__);
return $sCollation;
}
/**
* @return bool
*/
public function checkIndexRefreshMsg()
{
if (Registry::getSession()->getVariable('checkIndexRefreshMsg')) {
return true;
}
return false;
}
/**
* @return bool
*/
public function fixIndexRefreshMsg()
{
$blRet = true;
if (Registry::getSession()->getVariable('checkIndexRefreshMsg')) {
Registry::getSession()->setVariable('checkIndexRefreshMsg', false);
$this->_confirmMessage('D3_EXTSEARCH_UPDATE_GENPHONETIC');
}
return $blRet;
}
/**
* @return bool
* @throws DBALException
* @throws DatabaseConnectionException
*/
public function checkContentNoArtItemExist()
{
$blRet = false;
foreach ($this->getShopList() as $oShop) {
/** @var $oShop Shop */
$aWhere = array(
'oxloadid' => 'd3extsearch_noarticlefound',
'oxshopid' => $oShop->getId(),
);
$blRet = $this->_checkTableItemNotExist('oxcontents', $aWhere);
if ($blRet) {
return $blRet;
}
}
return $blRet;
}
/**
* @return bool true, if update is required
* @throws DatabaseConnectionException
*/
public function checkMultiLangDbItemsNotExist()
{
$blRet = false;
// change this to your inividual check criterias
$sSql = "SELECT count(`oxid`) ";
$sSql .= "FROM `d3_translations` WHERE 1;";
if ($this->getDb()->getOne($sSql) == 0) {
$blRet = true;
}
return $blRet;
}
/**
* @return bool
* @throws DBALException
* @throws DatabaseConnectionException
* @throws DatabaseErrorException
*/
public function importMultiLangItems()
{
$this->setInitialExecMethod(__METHOD__);
if ($this->checkMultiLangDbItemsNotExist()) {
if ($this->hasExecute()) {
/** @var d3_translations $oTranslation */
$oTranslation = oxNew(d3_translations::class);
$iImport = $oTranslation->importInstalled();
$this->setActionLog(
'MSG',
sprintf(Registry::getLang()->translateString('D3_MULTILANG_INSTALL_IMPORTSUCC'), $iImport),
$this->getInitialExecMethod(__METHOD__)
);
} else {
$this->setActionLog(
'MSG',
Registry::getLang()->translateString('D3_MULTILANG_INSTALL_EXECIMPORT'),
$this->getInitialExecMethod(__METHOD__)
);
}
$this->setUpdateBreak(true);
}
return true;
}
/**
* @return bool
* @throws DBALException
* @throws DatabaseConnectionException
* @throws DatabaseErrorException
* @throws d3ShopCompatibilityAdapterException
* @throws d3_cfg_mod_exception
* @throws StandardException
* @throws ReflectionException
* @throws d3ParameterNotFoundException
*/
public function hasUnregisteredFiles()
{
return $this->_hasUnregisteredFiles('d3_multilang', array('blocks', 'd3FileRegister'));
}
/**
* @return bool
* @throws DBALException
* @throws DatabaseConnectionException
* @throws DatabaseErrorException
* @throws ReflectionException
* @throws StandardException
* @throws d3ShopCompatibilityAdapterException
* @throws d3_cfg_mod_exception
*/
public function showUnregisteredFiles()
{
return $this->_showUnregisteredFiles('d3_multilang', array('blocks', 'd3FileRegister'));
}
}
<?php
namespace D3\Multilang\Setup;
use D3\ModCfg\Application\Model\d3database;
use D3\ModCfg\Application\Model\Exception\d3_cfg_mod_exception;
use D3\ModCfg\Application\Model\Exception\d3ParameterNotFoundException;
use D3\ModCfg\Application\Model\Exception\d3ShopCompatibilityAdapterException;
use D3\ModCfg\Application\Model\Install\d3install_updatebase;
use D3\ModCfg\Application\Model\Installwizzard\d3installconfirmmessage;
use D3\ModCfg\Application\Model\Installwizzard\d3installdbcommon;
use D3\Multilang\Application\Model\d3_translations;
use Doctrine\DBAL\DBALException;
use OxidEsales\Eshop\Application\Model\Shop;
use OxidEsales\Eshop\Core\DatabaseProvider;
use OxidEsales\Eshop\Core\Exception\ConnectionException;
use OxidEsales\Eshop\Core\Exception\DatabaseConnectionException;
use OxidEsales\Eshop\Core\Exception\DatabaseErrorException;
use OxidEsales\Eshop\Core\Exception\StandardException;
use OxidEsales\Eshop\Core\Registry;
use ReflectionException;
/**
* This Software is the property of Data Development and is protected
* by copyright law - it is NOT Freeware.
*
* Any unauthorized use of this software without a valid license
* is a violation of the license agreement and will be prosecuted by
* civil and criminal law.
*
* http://www.shopmodule.com
*
* @copyright (C) D3 Data Development (Inh. Thomas Dartsch)
* @author D3 Data Development - Daniel Seifert <support@shopmodule.com>
* @link http://www.oxidmodule.com
*/
class d3multilang_update extends d3install_updatebase
{
public $sModKey = 'd3_multilang';
public $sModName = 'Übersetzungsassistent';
public $sModVersion = '4.0.0.1';
public $sModRevision = '4001';
public $sBaseConf = 'b1av2==aGNOa0hIWDFTaGVGdUhSdysxSjB6SVowWUdyWFhWMGFXS2NpYktnKzlkN2ZnNG03MndET2RuW
nNPVnFudmFUU2d1WnNTV1hCNk5odUg5S1FXdnZIS3IvWTgvVnpOZVhmSzcyZW1JMHVJa0JJNkZEbjJCT
EY1RmEzaG5TUGNiSkRCTVVVK2kya2d5SDl4aTQ4R28waHlxUFBPVzhkQnM4Y0k3alZtYTVaTlFlYXVFV
0NxSGI5a2pnRTdzc2NFMEF2T3pSOW9zbG5EV01TLzU3UGEvZGRRcEZLeXNhNDMvQVV4YnVpN1c2czFad
VRmcHU5c3htT2lJRVhIVGxrK1RJOUczdEwzZjJNSnJGQ21iamhaR2w5QU9UemdKQUVxcU5CQWhCMnFyL
09ybjB5cWp0MTM5VUQ1K05rVmVGNkE5UUdQa3RKcXpyNkpEbWNuMGdCWDVZSG9nPT0=';
public $sRequirements = '';
public $sBaseValue = 'TyUzQTglM0ElMjJzdGRDbGFzcyUyMiUzQTQlM0ElN0JzJTNBMjglM0ElMjJkM19jZmdfbW9kX19hTGljZW5zZUluZm9NYWlsJTIyJTNCYSUzQTIlM0ElN0JzJTNBNDglM0ElMjJVTktOT1dOQ09ORktFWV9fNDc5MzYzODcwMmI2NzcxNWYxZGZiZmM4MzI0NjY5MTQlMjIlM0JzJTNBMTklM0ElMjIyMDEzLTEwLTE3JTIwMDklM0EzOSUzQTUyJTIyJTNCcyUzQTQyJTNBJTIyTk9MSUNLRVlfXzQ3OTM2Mzg3MDJiNjc3MTVmMWRmYmZjODMyNDY2OTE0JTIyJTNCcyUzQTE5JTNBJTIyMjAxMy0xMC0xNyUyMDA5JTNBNDElM0EyNyUyMiUzQiU3RHMlM0EzOCUzQSUyMmQzX2NmZ19tb2RfX2JsTXVsdGlsYW5nX091dHB1dE1pbWVUeXBlJTIyJTNCcyUzQTElM0ElMjIxJTIyJTNCcyUzQTMyJTNBJTIyZDNfY2ZnX21vZF9fc011bHRpbGFuZ19TZXBhcmF0b3IlMjIlM0JzJTNBMSUzQSUyMiU3QyUyMiUzQnMlM0E0MCUzQSUyMmQzX2NmZ19tb2RfX2JsTXVsdGlsYW5nX1NhdmVNaXNzaW5nSXRlbXMlMjIlM0JzJTNBMSUzQSUyMjElMjIlM0IlN0Q=';
protected $_aUpdateMethods = array(
array('check' => 'checkModCfgItemExist',
'do' => 'updateModCfgItemExist'),
array('check' => 'checkRenameFields',
'do' => 'fixRenameFields'),
array('check' => 'checkDeleteFields',
'do' => 'fixDeleteFields'),
array('check' => 'checkTranslationTableExist',
'do' => 'updateTranslationTableExist'),
array('check' => 'checkFields',
'do' => 'fixFields'),
array('check' => 'checkIdentCollation',
'do' => 'fixIdentCollation'),
array('check' => 'checkIndizes',
'do' => 'fixIndizes'),
array('check' => 'checkFieldsCollation',
'do' => 'fixFieldsCollation'),
array('check' => 'checkMultiLangDbItemsNotExist',
'do' => 'importMultiLangItems'),
array('check' => 'hasUnregisteredFiles',
'do' => 'showUnregisteredFiles'),
array('check' => 'checkModCfgSameRevision',
'do' => 'updateModCfgSameRevision'),
);
public $aFields = array(
'OXID' => array(
'sTableName' => 'd3_translations',
'sFieldName' => 'OXID',
'sType' => 'VARCHAR(100)',
'blNull' => false,
'sDefault' => false,
'sComment' => '',
'sExtra' => '',
'blMultilang' => false,
),
'OXTEXT' => array(
'sTableName' => 'd3_translations',
'sFieldName' => 'OXTEXT',
'sType' => 'TEXT',
'blNull' => false,
'sDefault' => false,
'sComment' => '',
'sExtra' => '',
'blMultilang' => true,
'sForceCollation' => 'utf8_general_ci'
),
'OXORIGINAL' => array(
'sTableName' => 'd3_translations',
'sFieldName' => 'OXORIGINAL',
'sType' => 'TINYINT(1)',
'blNull' => false,
'sDefault' => '0',
'sComment' => 'item is modified',
'sExtra' => '',
'blMultilang' => true,
),
'OXSTRING' => array(
'sTableName' => 'd3_translations',
'sFieldName' => 'OXSTRING',
'sType' => 'TINYINT(1)',
'blNull' => false,
'sDefault' => '1',
'sComment' => 'item ist string or serialized structure',
'sExtra' => '',
'blMultilang' => false,
),
'OXADMIN' => array(
'sTableName' => 'd3_translations',
'sFieldName' => 'OXADMIN',
'sType' => 'TINYINT(1)',
'blNull' => false,
'sDefault' => '0',
'sComment' => 'item is used in admin panel',
'sExtra' => '',
'blMultilang' => false,
),
);
public $aIndizes = array(
'OXID' => array(
'sTableName' => 'd3_translations',
'sType' => d3database::INDEX_TYPE_PRIMARY,
'sName' => 'OXID',
'aFields' => array(
'OXID' => 'OXID',
'OXADMIN' => 'OXADMIN',
),
),
);
public $aRenameFields = array(
'OXID' => array(
'sTableName' => 'd3_translations',
'mOldFieldNames' => array('oxident', 'OXIDENT'), // is case sensitive
'sFieldName' => 'OXID',
'blMultilang' => false,
),
'OXTEXT_0' => array(
'sTableName' => 'd3_translations',
'mOldFieldNames' => array('oxtext', 'oxtext_0'), // is case sensitive
'sFieldName' => 'OXTEXT',
'blMultilang' => false,
),
'OXTEXT' => array(
'sTableName' => 'd3_translations',
'mOldFieldNames' => array('oxtext'), // is case sensitive
'sFieldName' => 'OXTEXT',
'blMultilang' => true,
),
'OXORIGINAL' => array(
'sTableName' => 'd3_translations',
'mOldFieldNames' => array('oxoriginal'), // is case sensitive
'sFieldName' => 'OXORIGINAL',
'blMultilang' => false,
),
);
public $aDeleteFields = array(
'OXISSET' => array(
'sTableName' => 'd3_translations',
'sFieldName' => 'oxisset',
'blMultilang' => false,
),
);
protected $_aRefreshMetaModuleIds = array('d3_multilang');
/**
* @return bool
* @throws DBALException
* @throws DatabaseConnectionException
* @throws DatabaseErrorException
*/
public function checkTranslationTableExist()
{
return $this->_checkTableNotExist('d3_translations');
}
/**
* @return bool
* @throws ConnectionException
* @throws DBALException
* @throws DatabaseConnectionException
* @throws DatabaseErrorException
*/
public function updateTranslationTableExist()
{
$blRet = false;
if ($this->checkTranslationTableExist()) {
$this->setInitialExecMethod(__METHOD__);
$blRet = $this->_addTable2('d3_translations', $this->aFields, $this->aIndizes, 'D3 multilang', 'MyISAM');
}
return $blRet;
}
/**
* @return bool
* @throws DatabaseConnectionException
* @throws d3ParameterNotFoundException
*/
public function checkIdentCollation()
{
$sFieldCollation = $this->_getIdentCollation();
$sPattern = '@.*_cs|.*_bin@';
return false == preg_match($sPattern, $sFieldCollation);
}
/**
* @return bool
* @throws DBALException
* @throws DatabaseConnectionException
* @throws DatabaseErrorException
* @throws d3ParameterNotFoundException
*/
public function fixIdentCollation()
{
$sFieldIdent = 'OXID';
$sFieldCollation = $this->_getIdentCollation();
$sGeneralPattern = '@(.*)_ci@';
preg_match($sGeneralPattern, $sFieldCollation, $aGeneralMatches);
$sBinPattern = '@(.*)_general_ci@';
preg_match($sBinPattern, $sFieldCollation, $aBinMatches);
$oDatabase = $this->_getDatabaseHandler();
$sAvailableCollationSelect = "SHOW COLLATION WHERE Collation IN(
'".$aGeneralMatches[1]."_cs', 'utf8_general_cs', 'latin1_general_cs',
'".$aBinMatches[1]."_bin', 'utf8_bin', 'latin1_bin'
)";
$aAvailableCollations = DatabaseProvider::getDb(DatabaseProvider::FETCH_MODE_ASSOC)->getAll($sAvailableCollationSelect);
usort($aAvailableCollations, array($this, 'sortCollations'));
if (count($aAvailableCollations)) {
$sSelect = 'ALTER TABLE `'.$this->aFields[$sFieldIdent]['sTableName'].'` CHANGE `'.
$this->aFields[$sFieldIdent]['sFieldName'].'` `'.$this->aFields[$sFieldIdent]['sFieldName'].'` '.
$this->aFields[$sFieldIdent]['sType'].' CHARACTER SET '.$oDatabase->getBaseCharset().
' COLLATE '.$aAvailableCollations[0]['Collation'].' NOT NULL;';
$this->setActionLog(
'SQL',
$sSelect,
$this->getInitialExecMethod(__METHOD__)
);
/** @var d3installdbcommon $oDbCommon */
$oDbCommon = oxNew(d3installdbcommon::class, $this);
$blRet = $oDbCommon->tableSqlExecute($sSelect, $this->aFields[$sFieldIdent]['sTableName'], false);
} else {
/** @var d3installconfirmmessage $oMessage */
$sMessage = sprintf(
Registry::getLang()->translateString('D3_MULTILANG_INSTALL_NOCSCOLLATION'),
$this->aFields[$sFieldIdent]['sFieldName'],
$this->aFields[$sFieldIdent]['sTableName']
);
$oMessage = oxNew(d3installconfirmmessage::class, $this);
$blRet = $oMessage->confirmCustomMessage($sMessage);
}
return $blRet;
}
/**
* @param $a
* @param $b
*
* @return int
* @throws DBALException
* @throws DatabaseConnectionException
*/
public function sortCollations($a, $b)
{
$oDatabase = $this->_getDatabaseHandler();
$sBaseCharset = $oDatabase->getBaseCharset();
if ($a['Charset'] == $sBaseCharset && $b['Charset'] != $sBaseCharset) {
return -1;
} elseif ($a['Charset'] != $sBaseCharset && $b['Charset'] == $sBaseCharset) {
return 1;
}
if (strstr($a['Collation'], '_general_cs') && !strstr($b['Collation'], '_general_cs')) {
return -1;
} elseif (!strstr($a['Collation'], '_general_cs') && strstr($b['Collation'], '_general_cs')) {
return 1;
}
return 0;
}
/**
* @return string
* @throws DatabaseConnectionException
* @throws d3ParameterNotFoundException
*/
protected function _getIdentCollation()
{
if ($this->getCacheHandler()->has(__METHOD__)) {
return $this->getCacheHandler()->get(__METHOD__);
}
startProfile(__METHOD__);
$myConfig = Registry::getConfig();
$sSelect = 'select c.COLLATION_NAME from INFORMATION_SCHEMA.tables t ' .
'LEFT JOIN INFORMATION_SCHEMA.columns c ON t.TABLE_NAME = c.TABLE_NAME ' .
'where t.TABLE_SCHEMA = "' . $myConfig->getConfigParam('dbName') . '" ' .
'and t.TABLE_NAME = "d3_translations" ' .
'and c.TABLE_SCHEMA = "' . $myConfig->getConfigParam('dbName') . '" ' .
'and c.COLUMN_NAME = "OXID" ' .
' LIMIT 1';
$sCollation = DatabaseProvider::getDb(DatabaseProvider::FETCH_MODE_ASSOC)->getOne($sSelect);
$this->getCacheHandler()->set(__METHOD__, $sCollation);
stopProfile(__METHOD__);
return $sCollation;
}
/**
* @return bool
*/
public function checkIndexRefreshMsg()
{
if (Registry::getSession()->getVariable('checkIndexRefreshMsg')) {
return true;
}
return false;
}
/**
* @return bool
*/
public function fixIndexRefreshMsg()
{
$blRet = true;
if (Registry::getSession()->getVariable('checkIndexRefreshMsg')) {
Registry::getSession()->setVariable('checkIndexRefreshMsg', false);
$this->_confirmMessage('D3_EXTSEARCH_UPDATE_GENPHONETIC');
}
return $blRet;
}
/**
* @return bool
* @throws DBALException
* @throws DatabaseConnectionException
*/
public function checkContentNoArtItemExist()
{
$blRet = false;
foreach ($this->getShopList() as $oShop) {
/** @var $oShop Shop */
$aWhere = array(
'oxloadid' => 'd3extsearch_noarticlefound',
'oxshopid' => $oShop->getId(),
);
$blRet = $this->_checkTableItemNotExist('oxcontents', $aWhere);
if ($blRet) {
return $blRet;
}
}
return $blRet;
}
/**
* @return bool true, if update is required
* @throws DatabaseConnectionException
*/
public function checkMultiLangDbItemsNotExist()
{
$blRet = false;
// change this to your inividual check criterias
$sSql = "SELECT count(`oxid`) ";
$sSql .= "FROM `d3_translations` WHERE 1;";
if ($this->getDb()->getOne($sSql) == 0) {
$blRet = true;
}
return $blRet;
}
/**
* @return bool
* @throws DBALException
* @throws DatabaseConnectionException
* @throws DatabaseErrorException
*/
public function importMultiLangItems()
{
$this->setInitialExecMethod(__METHOD__);
if ($this->checkMultiLangDbItemsNotExist()) {
if ($this->hasExecute()) {
/** @var d3_translations $oTranslation */
$oTranslation = oxNew(d3_translations::class);
$iImport = $oTranslation->importInstalled();
$this->setActionLog(
'MSG',
sprintf(Registry::getLang()->translateString('D3_MULTILANG_INSTALL_IMPORTSUCC'), $iImport),
$this->getInitialExecMethod(__METHOD__)
);
} else {
$this->setActionLog(
'MSG',
Registry::getLang()->translateString('D3_MULTILANG_INSTALL_EXECIMPORT'),
$this->getInitialExecMethod(__METHOD__)
);
}
$this->setUpdateBreak(true);
}
return true;
}
/**
* @return bool
* @throws DBALException
* @throws DatabaseConnectionException
* @throws DatabaseErrorException
* @throws d3ShopCompatibilityAdapterException
* @throws d3_cfg_mod_exception
* @throws StandardException
* @throws ReflectionException
* @throws d3ParameterNotFoundException
*/
public function hasUnregisteredFiles()
{
return $this->_hasUnregisteredFiles('d3_multilang', array('blocks', 'd3FileRegister'));
}
/**
* @return bool
* @throws DBALException
* @throws DatabaseConnectionException
* @throws DatabaseErrorException
* @throws ReflectionException
* @throws StandardException
* @throws d3ShopCompatibilityAdapterException
* @throws d3_cfg_mod_exception
*/
public function showUnregisteredFiles()
{
return $this->_showUnregisteredFiles('d3_multilang', array('blocks', 'd3FileRegister'));
}
}

View File

@ -1,12 +1,12 @@
<?xml version="1.0" encoding="ISO-8859-1"?>
<OX>
<OXMENU id="d3mxd3modules">
<MAINMENU id="d3mxmultilang">
<SUBMENU id="d3mxmultilang_settings" cl="d3_cfg_multilang" list="d3_cfg_multilang_list">
<TAB id="d3tbclmultilang_imex" cl="d3_cfg_multilang_imex" />
<TAB id="d3tbclmultilang_translations" cl="d3_cfg_multilang_main" />
<TAB id="d3tbcl_licence" cl="d3_cfg_multilang_licence" />
</SUBMENU>
</MAINMENU>
</OXMENU>
</OX>
<?xml version="1.0" encoding="ISO-8859-1"?>
<OX>
<OXMENU id="d3mxd3modules">
<MAINMENU id="d3mxmultilang">
<SUBMENU id="d3mxmultilang_settings" cl="d3_cfg_multilang" list="d3_cfg_multilang_list">
<TAB id="d3tbclmultilang_imex" cl="d3_cfg_multilang_imex" />
<TAB id="d3tbclmultilang_translations" cl="d3_cfg_multilang_main" />
<TAB id="d3tbcl_licence" cl="d3_cfg_multilang_licence" />
</SUBMENU>
</MAINMENU>
</OXMENU>
</OX>

View File

@ -1,89 +1,89 @@
<?php
/**
* This Software is the property of Data Development and is protected
* by copyright law - it is NOT Freeware.
* Any unauthorized use of this software without a valid license
* is a violation of the license agreement and will be prosecuted by
* civil and criminal law.
* http://www.shopmodule.com
*
* @copyright (C) D3 Data Development (Inh. Thomas Dartsch)
* @author D3 Data Development - Daniel Seifert <support@shopmodule.com>
* @link http://www.oxidmodule.com
*/
use D3\ModCfg\Application\Controller\Admin\Maintenance\d3cleartmp;
use D3\ModCfg\Application\Model\d3utils;
use D3\ModCfg\Application\Model\Maintenance\d3clrtmp;
use OxidEsales\Eshop\Application\Controller\Admin\SystemRequirementsMain;
use OxidEsales\Eshop\Core\Language;
/**
* Metadata version
*/
$sMetadataVersion = '2.0';
/**
* Module information
*/
$aModule = array(
'id' => 'd3_multilang',
'title' => (class_exists(d3utils::class) ? d3utils::getInstance()->getD3Logo() : 'D&sup3;') . ' &Uuml;bersetzungsassistent',
'description' => array(
'de' => 'Verwalten Sie die Textbausteine des Shop bequem im Adminbereich',
'en' => '',
),
'thumbnail' => 'picture.png',
'version' => '4.0.0.1',
'author' => 'D&sup3; Data Development (Inh.: Thomas Dartsch)',
'email' => 'support@shopmodule.com',
'url' => 'http://www.oxidmodule.com/',
'extend' => array(
Language::class => D3\Multilang\Modules\Core\d3_oxlang_multilang::class,
d3cleartmp::class => D3\Multilang\Modules\Application\Controller\Admin\d3cleartmp_multilang::class,
d3clrtmp::class => D3\Multilang\Modules\Application\Model\Maintenance\d3clrtmp_multilang::class,
SystemRequirementsMain::class => D3\Multilang\Modules\Application\Controller\Admin\d3_sysreq_main_multilang::class,
),
'controllers' => array(
'd3_cfg_multilang' => D3\Multilang\Application\Controller\Admin\d3_cfg_multilang::class,
'd3_cfg_multilang_imex' => D3\Multilang\Application\Controller\Admin\d3_cfg_multilang_imex::class,
'd3_cfg_multilang_licence' => D3\Multilang\Application\Controller\Admin\d3_cfg_multilang_licence::class,
'd3_cfg_multilang_list' => D3\Multilang\Application\Controller\Admin\d3_cfg_multilang_list::class,
'd3_cfg_multilang_main' => D3\Multilang\Application\Controller\Admin\d3_cfg_multilang_main::class,
),
'templates' => array(
'd3_cfg_multilang_imex.tpl' => 'd3/multilang/Application/views/admin/tpl/d3_cfg_multilang_imex.tpl',
'd3_cfg_multilang_main.tpl' => 'd3/multilang/Application/views/admin/tpl/d3_cfg_multilang_main.tpl',
'd3_oxid_lang_file_pattern.tpl' => 'd3/multilang/Application/views/admin/tpl/modcfg-pattern/oxid_lang_file.tpl',
),
'events' => array(
'onActivate' => '\D3\Multilang\Setup\Events::onActivate',
'onDeactivate' => '\D3\Multilang\Setup\Events::onDeactivate',
),
'settings' => array(
),
'blocks' => array(
array(
'template' => 'd3cleartmp.tpl',
'block' => 'd3cleartmp_additional',
'file' => 'Application/views/admin/blocks/d3cleartmp_multilang.tpl',
),
array(
'template' => 'd3cleartmp.tpl',
'block' => 'd3cleartmp_js_singleitems',
'file' => 'Application/views/admin/blocks/d3cleartmp_multilang_js.tpl',
),
),
'd3FileRegister' => array(
'd3/multilang/Application/views/admin/de/d3_multilang_lang.php',
'd3/multilang/Application/views/admin/en/d3_multilang_lang.php',
'd3/multilang/Application/Model/d3_translations.php',
'd3/multilang/metadata.php',
'd3/multilang/Setup/Events.php',
'd3/multilang/IntelliSenseHelper.php',
),
'd3SetupClasses' => array(
D3\Multilang\Setup\d3multilang_update::class,
),
<?php
/**
* This Software is the property of Data Development and is protected
* by copyright law - it is NOT Freeware.
* Any unauthorized use of this software without a valid license
* is a violation of the license agreement and will be prosecuted by
* civil and criminal law.
* http://www.shopmodule.com
*
* @copyright (C) D3 Data Development (Inh. Thomas Dartsch)
* @author D3 Data Development - Daniel Seifert <support@shopmodule.com>
* @link http://www.oxidmodule.com
*/
use D3\ModCfg\Application\Controller\Admin\Maintenance\d3cleartmp;
use D3\ModCfg\Application\Model\d3utils;
use D3\ModCfg\Application\Model\Maintenance\d3clrtmp;
use OxidEsales\Eshop\Application\Controller\Admin\SystemRequirementsMain;
use OxidEsales\Eshop\Core\Language;
/**
* Metadata version
*/
$sMetadataVersion = '2.0';
/**
* Module information
*/
$aModule = array(
'id' => 'd3_multilang',
'title' => (class_exists(d3utils::class) ? d3utils::getInstance()->getD3Logo() : 'D&sup3;') . ' &Uuml;bersetzungsassistent',
'description' => array(
'de' => 'Verwalten Sie die Textbausteine des Shop bequem im Adminbereich',
'en' => '',
),
'thumbnail' => 'picture.png',
'version' => '4.0.0.1',
'author' => 'D&sup3; Data Development (Inh.: Thomas Dartsch)',
'email' => 'support@shopmodule.com',
'url' => 'http://www.oxidmodule.com/',
'extend' => array(
Language::class => D3\Multilang\Modules\Core\d3_oxlang_multilang::class,
d3cleartmp::class => D3\Multilang\Modules\Application\Controller\Admin\d3cleartmp_multilang::class,
d3clrtmp::class => D3\Multilang\Modules\Application\Model\Maintenance\d3clrtmp_multilang::class,
SystemRequirementsMain::class => D3\Multilang\Modules\Application\Controller\Admin\d3_sysreq_main_multilang::class,
),
'controllers' => array(
'd3_cfg_multilang' => D3\Multilang\Application\Controller\Admin\d3_cfg_multilang::class,
'd3_cfg_multilang_imex' => D3\Multilang\Application\Controller\Admin\d3_cfg_multilang_imex::class,
'd3_cfg_multilang_licence' => D3\Multilang\Application\Controller\Admin\d3_cfg_multilang_licence::class,
'd3_cfg_multilang_list' => D3\Multilang\Application\Controller\Admin\d3_cfg_multilang_list::class,
'd3_cfg_multilang_main' => D3\Multilang\Application\Controller\Admin\d3_cfg_multilang_main::class,
),
'templates' => array(
'd3_cfg_multilang_imex.tpl' => 'd3/multilang/Application/views/admin/tpl/d3_cfg_multilang_imex.tpl',
'd3_cfg_multilang_main.tpl' => 'd3/multilang/Application/views/admin/tpl/d3_cfg_multilang_main.tpl',
'd3_oxid_lang_file_pattern.tpl' => 'd3/multilang/Application/views/admin/tpl/modcfg-pattern/oxid_lang_file.tpl',
),
'events' => array(
'onActivate' => '\D3\Multilang\Setup\Events::onActivate',
'onDeactivate' => '\D3\Multilang\Setup\Events::onDeactivate',
),
'settings' => array(
),
'blocks' => array(
array(
'template' => 'd3cleartmp.tpl',
'block' => 'd3cleartmp_additional',
'file' => 'Application/views/admin/blocks/d3cleartmp_multilang.tpl',
),
array(
'template' => 'd3cleartmp.tpl',
'block' => 'd3cleartmp_js_singleitems',
'file' => 'Application/views/admin/blocks/d3cleartmp_multilang_js.tpl',
),
),
'd3FileRegister' => array(
'd3/multilang/Application/views/admin/de/d3_multilang_lang.php',
'd3/multilang/Application/views/admin/en/d3_multilang_lang.php',
'd3/multilang/Application/Model/d3_translations.php',
'd3/multilang/metadata.php',
'd3/multilang/Setup/Events.php',
'd3/multilang/IntelliSenseHelper.php',
),
'd3SetupClasses' => array(
D3\Multilang\Setup\d3multilang_update::class,
),
);