Skip to content

Commit

Permalink
Fix translations for legacy parts of BO.
Browse files Browse the repository at this point in the history
  • Loading branch information
MeKeyCool committed May 9, 2022
1 parent 4d94958 commit 1d151ce
Showing 1 changed file with 7 additions and 1 deletion.
8 changes: 7 additions & 1 deletion config/config.inc.php
Expand Up @@ -221,7 +221,13 @@
if (isset($cookie->id_lang) && $cookie->id_lang) {
$language = new Language($cookie->id_lang);
}
if (!isset($language) || !Validate::isLoadedObject($language) || !$language->isAssociatedToShop()) {

$isNotValidLanguage = !isset($language) || !Validate::isLoadedObject($language);
// `true` if language is defined from multishop or backoffice session
$isLanguageDefinedFromCustomSession = (isset($language) && $language->isAssociatedToShop()) || isset($employee);

$useDefaultLanguage = $isNotValidLanguage || !$isLanguageDefinedFromCustomSession;
if ($useDefaultLanguage) {
$language = new Language(Configuration::get('PS_LANG_DEFAULT'));
}

Expand Down

0 comments on commit 1d151ce

Please sign in to comment.