[cpo+] : Modifikationen

« zurück

Defaultsprache Deutsch

Kategorie:Nice-to-have
Beschreibung:Die meisten Anwender benötigen eine deutschsprachige Installation und müssen dies immer erst umstellen.
Dies stellt die Default-Sprache auf deutsch um.
Erstellt von:Markus Rösel
Geprüft von:
Veröffentlicht von:
CPO+ Version:4.1.6+1
Kurze Erläuterung der Codeanpassung:In _setup/step0.php wird die Sprachfestlegung auf deutsch umgestellt und die Vorbelegung der POST-Variable eine Zeile höher gesetzt.
In _include/common.inc.php werden alle Vorkommen von "english" in "deutsch" geändert.

Code vorher:

[[ ********* File: _setup/step0.php ********* ]] define('CPO', true); define('SETUP', true); require_once('../_include/common.inc.php'); if (!isset($_POST['language'])) $_POST['language'] = 'english'; include(CPO_BASEDIR.'_include/header.php'); [[ ********* File: _include/common.inc.php ********* ]] $cpoSystemDefaults = array( 'owner' => '', 'lkey' => '', 'project' => 'ConPresso 4', 'release' => false, 'system_email' => '', // FIXME I don't like these defaults 'admin_email' => '', 'timeout' => 3*60*60, 'max_image' => 2*1024*1024, 'max_file' => 2*1024*1024, 'language' => 'english', 'base_url' => '', 'targets' => '_self _blank _top', 'send_pw' => true, 'help' => true, 'noOfFiles' => 5, 'noOfArticles' => 10, 'noOfUploadFiles' => 5, 'homepage' => '_admin/index.php', 'statistics' => false, 'sessionsInDB' => true, 'ipcheck' => false, 'startnews' => true, 'date_format' => 'Y-m-d H:i', 'editorCSS' => '', 'CSSURL' => '', 'bodyId' => '', 'installed' => time(), // actual date as default installation time 'PATH_INFO' => false, 'logfiledays' => 365, 'nolocktables' => false, ); initVar($cpoSystem, $cpoSystemDefaults); // always use sensible defaults if ($cpoSystem['timeout']<5*60) $cpoSystem['timeout'] = 5*60; if ($cpoSystem['noOfFiles']<1) $cpoSystem['noOfFiles'] = 1; if ($cpoSystem['noOfArticles']<1) $cpoSystem['noOfArticles'] = 1; if ($cpoSystem['noOfUploadFiles']<1) $cpoSystem['noOfUploadFiles'] = 1; if ($cpoSystem['language']=='') $cpoSystem['language'] = 'english';

Code nachher:

[[ ********* File: _setup/step0.php ********* ]] define('CPO', true); define('SETUP', true); if (!isset($_POST['language'])) $_POST['language'] = 'deutsch'; require_once('../_include/common.inc.php'); include(CPO_BASEDIR.'_include/header.php'); [[ ********* File: _include/common.inc.php ********* ]] $cpoSystemDefaults = array( 'owner' => '', 'lkey' => '', 'project' => 'ConPresso 4', 'release' => false, 'system_email' => '', // FIXME I don't like these defaults 'admin_email' => '', 'timeout' => 3*60*60, 'max_image' => 2*1024*1024, 'max_file' => 2*1024*1024, 'language' => 'deutsch', 'base_url' => '', 'targets' => '_self _blank _top', 'send_pw' => true, 'help' => true, 'noOfFiles' => 5, 'noOfArticles' => 10, 'noOfUploadFiles' => 5, 'homepage' => '_admin/index.php', 'statistics' => false, 'sessionsInDB' => true, 'ipcheck' => false, 'startnews' => true, 'date_format' => 'Y-m-d H:i', 'editorCSS' => '', 'CSSURL' => '', 'bodyId' => '', 'installed' => time(), // actual date as default installation time 'PATH_INFO' => false, 'logfiledays' => 365, 'nolocktables' => false, ); initVar($cpoSystem, $cpoSystemDefaults); // always use sensible defaults if ($cpoSystem['timeout']<5*60) $cpoSystem['timeout'] = 5*60; if ($cpoSystem['noOfFiles']<1) $cpoSystem['noOfFiles'] = 1; if ($cpoSystem['noOfArticles']<1) $cpoSystem['noOfArticles'] = 1; if ($cpoSystem['noOfUploadFiles']<1) $cpoSystem['noOfUploadFiles'] = 1; if ($cpoSystem['language']=='') $cpoSystem['language'] = 'deutsch';
« zurück