Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

pkp/pkp-lib#9374 Make author bio multilingual #38

Merged
merged 1 commit into from
Nov 22, 2023
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
8 changes: 6 additions & 2 deletions JatsTemplatePlugin.inc.php
Original file line number Diff line number Diff line change
Expand Up @@ -181,8 +181,12 @@ function toXml(&$record, $format = null) {
$config->set('Cache.SerializerPath', 'cache');
$purifier = new HTMLPurifier($config);
}
$response .= (($bio = $author->getLocalizedBiography()) != '' ? "\t\t\t\t\t<bio>" . $purifier->purify($bio) . '</bio>\n' : '') .
"\t\t\t\t</contrib>\n";

foreach ($author->getData('biography') as $locale => $bio) {
$response .= "\t\t\t\t\t<bio xml:lang=\"" . substr($locale, 0, 2) . "\">" . $purifier->purify($bio) . "</bio>\n";
}

$response .= "\t\t\t\t</contrib>\n";
}
$response .= "\t\t\t</contrib-group>\n";
foreach ($affiliations as $affiliationToken => $affiliation) {
Expand Down