Skip to content

Commit

Permalink
fix #468
Browse files Browse the repository at this point in the history
  • Loading branch information
Pathologic committed Jul 22, 2024
1 parent 1d1c9b3 commit b046b46
Show file tree
Hide file tree
Showing 2 changed files with 25 additions and 2 deletions.
1 change: 1 addition & 0 deletions install/setup.sql
Original file line number Diff line number Diff line change
Expand Up @@ -936,6 +936,7 @@ INSERT IGNORE INTO `{PREFIX}system_settings`
('manager_theme','default'),
('server_offset_time','0'),
('manager_language','{MANAGERLANGUAGE}'),
('lang_code','{LANGCODE}'),
('modx_charset','UTF-8'),
('site_name','My Evolution Site'),
('site_start','1'),
Expand Down
26 changes: 24 additions & 2 deletions install/sqlParser.class.php
Original file line number Diff line number Diff line change
Expand Up @@ -90,7 +90,28 @@ public function process($filename) {
$idata = str_replace(substr($idata, $s,$e-$s),' Removed non upgradeable items', $idata);
}
}

$_langFiles= array (
"en" => "english",
"bg" => "bulgarian",
"cs" => "czech",
"da" => "danish",
"fi" => "finnish-utf8",
"fr" => "francais-utf8",
"de" => "german",
"he" => "hebrew",
"it" => "italian",
"ja" => "japanese-utf8",
"nl" => "nederlands-utf8",
"no" => "norwegian",
"fa" => "persian",
"pl" => "polish-utf8",
"pt" => "portuguese-br-utf8",
"ru" => "russian-UTF8",
"es" => "spanish-utf8",
"sv" => "svenska"
);
$lang_code = array_search($this->managerlanguage, $_langFiles);
$lang_code = $lang_code === false ? 'en' : $lang_code;
// replace {} tags
$idata = str_replace('{PREFIX}', $this->prefix, $idata);
$idata = str_replace('{TABLEENCODING}', $this->getTableEncoding(), $idata);
Expand All @@ -100,7 +121,8 @@ public function process($filename) {
$idata = str_replace('{IMAGEPATH}', $this->imgPath, $idata);
$idata = str_replace('{IMAGEURL}', $this->imgUrl, $idata);
$idata = str_replace('{FILEMANAGERPATH}', $this->fileManagerPath, $idata);
$idata = str_replace('{MANAGERLANGUAGE}', $this->managerlanguage, $idata);
$idata = str_replace('{MANAGERLANGUAGE}', $_langFiles[$lang_code], $idata);
$idata = str_replace('{LANGCODE}', $lang_code, $idata);
$idata = str_replace('{AUTOTEMPLATELOGIC}', $this->autoTemplateLogic, $idata);
/*$idata = str_replace('{VERSION}', $modx_version, $idata);*/

Expand Down

0 comments on commit b046b46

Please sign in to comment.