Skip to content

Commit

Permalink
Merge pull request #119 from jyhein/f699
Browse files Browse the repository at this point in the history
pkp/pkp-lib#699 Show locale in url in multilingual contexts
  • Loading branch information
bozana authored Apr 25, 2024
2 parents 71f3c57 + b612a20 commit 96c7759
Showing 1 changed file with 3 additions and 3 deletions.
6 changes: 3 additions & 3 deletions CitationStyleLanguagePlugin.php
Original file line number Diff line number Diff line change
Expand Up @@ -448,7 +448,7 @@ public function getCitation(PKPRequest $request, Submission $submission, string
}
$citationData->abstract = htmlspecialchars(strip_tags($publication->getLocalizedData('abstract')));
$citationData = $this->setArticleAuthors($citationData, $publication, $context);
$citationData->URL = $request->getDispatcher()->url($request, PKPApplication::ROUTE_PAGE, null, $this->getPublicationTypeUrlPath(), 'view', $publication->getData('urlPath') ?? $submission->getId());
$citationData->URL = $request->getDispatcher()->url($request, PKPApplication::ROUTE_PAGE, null, $this->getPublicationTypeUrlPath(), 'view', $publication->getData('urlPath') ?? $submission->getId(), urlLocaleForPage: '');
if ($publication->getDoi()) {
$citationData->DOI = $publication->getDoi();
}
Expand All @@ -466,7 +466,7 @@ public function getCitation(PKPRequest $request, Submission $submission, string
$citationData->abstract = htmlspecialchars(strip_tags($publication->getLocalizedData('abstract')));
$citationData->serialNumber = $this->getSerialNumber($publication);
$citationData = $this->setBookAuthors($citationData, $publication, $context);
$citationData->URL = $request->getDispatcher()->url($request, PKPApplication::ROUTE_PAGE, null, $this->getPublicationTypeUrlPath(), 'book', $publication->getData('urlPath') ?? $submission->getId());
$citationData->URL = $request->getDispatcher()->url($request, PKPApplication::ROUTE_PAGE, null, $this->getPublicationTypeUrlPath(), 'book', $publication->getData('urlPath') ?? $submission->getId(), urlLocaleForPage: '');
if ($publication->getDoi()) {
$citationData->DOI = $publication->getDoi();
}
Expand All @@ -484,7 +484,7 @@ public function getCitation(PKPRequest $request, Submission $submission, string
$citationData->abstract = htmlspecialchars(strip_tags($chapter->getLocalizedData('abstract')));
$citationData->serialNumber = $this->getSerialNumber($publication);
$citationData = $this->setBookChapterAuthors($citationData, $publication, $context, $chapter);
$citationData->URL = $request->getDispatcher()->url($request, PKPApplication::ROUTE_PAGE, null, $this->getPublicationTypeUrlPath(), 'book', [$publication->getData('urlPath') ?? $submission->getId(), 'chapter', $chapter->getSourceChapterId()]);
$citationData->URL = $request->getDispatcher()->url($request, PKPApplication::ROUTE_PAGE, null, $this->getPublicationTypeUrlPath(), 'book', [$publication->getData('urlPath') ?? $submission->getId(), 'chapter', $chapter->getSourceChapterId()], urlLocaleForPage: '');

if ($chapter->getDoi()) {
$citationData->DOI = $chapter->getDoi();
Expand Down

0 comments on commit 96c7759

Please sign in to comment.