Skip to content

Commit

Permalink
Merge pull request zencart#6474 from lat9/zc-plugin-language-default
Browse files Browse the repository at this point in the history
`zc_plugin`: Enable installer language default
  • Loading branch information
drbyte committed May 24, 2024
2 parents f520793 + 9a37abb commit 8da6f3c
Showing 1 changed file with 11 additions and 2 deletions.
13 changes: 11 additions & 2 deletions includes/classes/PluginSupport/BasePluginInstaller.php
Original file line number Diff line number Diff line change
Expand Up @@ -94,13 +94,22 @@ protected function setPluginVersionStatus($pluginKey, $version, $status)
$this->dbConn->execute($sql);
}


protected function loadInstallerLanguageFile($file)
{
$lng = $_SESSION['language'];
$filename = $this->pluginDir . '/Installer/languages/' . $lng . '/' . $file;
if (file_exists($filename)) {
require_once($filename);
require_once $filename;
return;
}

if ($lng === 'english') {
return;
}

$filename = $this->pluginDir . '/Installer/languages/english/' . $file;
if (file_exists($filename)) {
require_once $filename;
}
}

Expand Down

0 comments on commit 8da6f3c

Please sign in to comment.