diff --git a/plugins/generic/announcementFeed/AnnouncementFeedGatewayPlugin.php b/plugins/generic/announcementFeed/AnnouncementFeedGatewayPlugin.php index 80b244579cc..8f93e58d349 100644 --- a/plugins/generic/announcementFeed/AnnouncementFeedGatewayPlugin.php +++ b/plugins/generic/announcementFeed/AnnouncementFeedGatewayPlugin.php @@ -19,6 +19,7 @@ use APP\template\TemplateManager; use PKP\core\Core; use PKP\db\DAORegistry; +use PKP\facades\Locale; use PKP\plugins\GatewayPlugin; use PKP\site\VersionDAO; @@ -161,6 +162,7 @@ public function fetch($args, $request) 'dateUpdated' => $dateUpdated, 'announcements' => $announcements, 'journal' => $journal, + 'language' => str_replace('_', '-', str_replace(['@cyrillic', '@latin', '_Latn', '_Cyrl'], '', Locale::getLocale())), ]); $templateMgr->setHeaders(['content-type: ' . $mimeTypeMap[$type] . '; charset=utf-8']); diff --git a/plugins/generic/announcementFeed/templates/rss.tpl b/plugins/generic/announcementFeed/templates/rss.tpl index 3193e4a66dc..c739a62911d 100644 --- a/plugins/generic/announcementFeed/templates/rss.tpl +++ b/plugins/generic/announcementFeed/templates/rss.tpl @@ -28,7 +28,7 @@ {* optional elements *} {if $journal->getPrimaryLocale()} - {$journal->getPrimaryLocale()|replace:'_':'-'|strip|escape:"html"} + {$language|escape} {/if} diff --git a/plugins/generic/announcementFeed/templates/rss2.tpl b/plugins/generic/announcementFeed/templates/rss2.tpl index 4bbb7a84f5b..8b107c01a3b 100644 --- a/plugins/generic/announcementFeed/templates/rss2.tpl +++ b/plugins/generic/announcementFeed/templates/rss2.tpl @@ -23,7 +23,7 @@ {* optional elements *} {if $journal->getPrimaryLocale()} - {$journal->getPrimaryLocale()|replace:'_':'-'|strip|escape:"html"} + {$language|escape} {/if} {capture assign="dateUpdated"}{$dateUpdated|strtotime}{/capture} {$smarty.const.DATE_RSS|date:$dateUpdated}