Skip to content

Commit

Permalink
use getIso1FromLocale, us weblate locales for ui
Browse files Browse the repository at this point in the history
  • Loading branch information
bozana committed Oct 29, 2024
1 parent 5800e0f commit 0941244
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions GoogleScholarPlugin.php
Original file line number Diff line number Diff line change
Expand Up @@ -180,7 +180,7 @@ public function submissionView($hookName, $args)
if ($subjects = $publication->getData('subjects')) {
foreach ($subjects as $locale => $localeSubjects) {
foreach ($localeSubjects as $i => $subject) {
$templateMgr->addHeader('googleScholarSubject' . $i++, '<meta name="citation_keywords" xml:lang="' . htmlspecialchars(substr($locale, 0, 2)) . '" content="' . htmlspecialchars($subject) . '"/>');
$templateMgr->addHeader('googleScholarSubject' . $i++, '<meta name="citation_keywords" xml:lang="' . htmlspecialchars(LocaleConversion::getIso1FromLocale($locale)) . '" content="' . htmlspecialchars($subject) . '"/>');
}
}
}
Expand All @@ -189,7 +189,7 @@ public function submissionView($hookName, $args)
if ($keywords = $publication->getData('keywords')) {
foreach ($keywords as $locale => $localeKeywords) {
foreach ($localeKeywords as $i => $keyword) {
$templateMgr->addHeader('googleScholarKeyword' . $i++, '<meta name="citation_keywords" xml:lang="' . htmlspecialchars(substr($locale, 0, 2)) . '" content="' . htmlspecialchars($keyword) . '"/>');
$templateMgr->addHeader('googleScholarKeyword' . $i++, '<meta name="citation_keywords" xml:lang="' . htmlspecialchars(LocaleConversion::getIso1FromLocale($locale)) . '" content="' . htmlspecialchars($keyword) . '"/>');
}
}
}
Expand Down

0 comments on commit 0941244

Please sign in to comment.