Skip to content

Commit

Permalink
pkp/pkp-lib#7352 Top menu lang display update
Browse files Browse the repository at this point in the history
  • Loading branch information
touhidurabir committed Mar 6, 2023
1 parent 26e91ef commit 301a868
Showing 1 changed file with 8 additions and 2 deletions.
10 changes: 8 additions & 2 deletions classes/template/TemplateManager.php
Original file line number Diff line number Diff line change
Expand Up @@ -21,6 +21,8 @@
use APP\core\Application;
use APP\file\PublicFileManager;
use PKP\context\Context;
use PKP\facades\Locale;
use PKP\i18n\LocaleMetadata;
use PKP\security\Role;
use PKP\session\SessionManager;
use PKP\site\Site;
Expand Down Expand Up @@ -70,7 +72,7 @@ public function initialize($request)
'siteTitle' => $context->getLocalizedName(),
'publicFilesDir' => $request->getBaseUrl() . '/' . $publicFileManager->getContextFilesPath($context->getId()),
'primaryLocale' => $context->getPrimaryLocale(),
'supportedLocales' => $context->getSupportedLocaleNames(),
'supportedLocales' => $context->getSupportedLocaleNames(LocaleMetadata::LANGUAGE_LOCALE_ONLY),
'numPageLinks' => $context->getData('numPageLinks'),
'itemsPerPage' => $context->getData('itemsPerPage'),
'enableAnnouncements' => $context->getData('enableAnnouncements'),
Expand All @@ -93,7 +95,11 @@ public function initialize($request)
'disableUserReg' => empty($contextsForRegistration),
'siteTitle' => $site->getLocalizedTitle(),
'primaryLocale' => $site->getPrimaryLocale(),
'supportedLocales' => $site->getSupportedLocalenames(),
'supportedLocales' => Locale::getFormattedDisplayNames(
$site->getSupportedLocales(),
Locale::getLocales(),
LocaleMetadata::LANGUAGE_LOCALE_ONLY
),
'pageFooter' => $site->getLocalizedData('pageFooter'),
]);
}
Expand Down

0 comments on commit 301a868

Please sign in to comment.