Summon Integration (Multiple Language Support)
Please review our general Ex Libris Summon Overview and Step-by-Step Installation Guide first! This guide will only explain the details related to setting up multiple language support in the script. It will work best to have the default integration setup and functioning before modifying it further.
Summon Integration (Multiple Language Support) Overview
The default Summon integration script sets up LibKey integration links in Summon in a single language. We have been in touch with some of our subscribers who have helped develop an integration script which can handle Summon instances offering multiple languages and ensure LibKey integration links are presented in the correct language for users.
To set this up, you will need to know the language codes associated with the alternative languages your Summon offers. These can be found by switching between languages in Summon and examining how the URL changes for different languages.
In the example screenshots below, notice how the Greek version of Summon contains gr-GR
in the URL while the English one uses en
.
Example Multiple Language Support Integration Script
These language codes will need to be inserted into the script as in the example below. It is, in essence, two copies of the integration code using two different languages for the display text. There is an additional piece of scripting to look for these language codes in the URL to tell the script which version to use.
Our example uses gr-GR
for Greek. If you are using different languages, please insert the language codes you are using and the phrasing you want in the same way shown below. You can also still customize the specific LibKey options and settings as desired:
if(window.location.href.indexOf("gr-GR") > -1) {
var browzine = {
libraryId: "XXX",
apiKey: "ENTER API KEY",
version: 2, // Required for the other parameters below to work after December 15, 2021.
articlePDFDownloadLinkEnabled: true,
articlePDFDownloadWording: "Εμφάνιση Τώρα",
articlePDFDownloadLinkText: "PDF",
articleLinkEnabled: true,
articleLinkTextWording: "Εμφάνιση Τώρα",
articleLinkText: "Ανοίξτε το Άρθρο",
articleBrowZineWebLinkTextEnabled: true,
articleWording: "Εμφάνιση στο Περιβάλλον του Περιοδικού",
articleBrowZineWebLinkText: "Πλοηγηθείτε στο Περιοδικό",
journalBrowZineWebLinkTextEnabled: true,
journalWording: "Εμφάνιση του Περιοδικού",
journalBrowZineWebLinkText: "Πλοηγηθείτε Τώρα",
printRecordsIntegrationEnabled: true,
showFormatChoice: false,
showLinkResolverLink: true,
enableLinkOptimizer: true,
unpaywallEmailAddressKey: "YourUniversityEmail@greatuniversity.edu",
articlePDFDownloadViaUnpaywallEnabled: true,
articlePDFDownloadViaUnpaywallWording: "Εμφάνιση Τώρα (μέσω Unpaywall)",
articlePDFDownloadViaUnpaywallLinkText: "PDF",
articleLinkViaUnpaywallEnabled: true,
articleLinkViaUnpaywallWording: "Εμφάνιση Τώρα (μέσω Unpaywall)",
articleLinkViaUnpaywallLinkText: "Ανοίξτε το Άρθρο",
articleAcceptedManuscriptPDFViaUnpaywallEnabled: true,
articleAcceptedManuscriptPDFViaUnpaywallWording: "Εμφάνιση Τώρα (Accepted Manuscript μέσω Unpaywall)",
articleAcceptedManuscriptPDFViaUnpaywallLinkText: "PDF",
articleAcceptedManuscriptArticleLinkViaUnpaywallEnabled: true,
articleAcceptedManuscriptArticleLinkViaUnpaywallWording: "Εμφάνιση Τώρα (μέσω Unpaywall)",
articleAcceptedManuscriptArticleLinkViaUnpaywallLinkText: "Ανοίξτε το Άρθρο",
articleRetractionWatchEnabled: true,
articleRetractionWatchTextWording: "Το Άρθρο Αποσύρθηκε (Retracted)",
articleRetractionWatchText: "Περισσότερες Πληροφορίες",
articleExpressionOfConcernEnabled: true,
articleExpressionOfConcernWording: "Έκφραση Ανησυχίας",
articleExpressionOfConcernText: "Περισσότερες Πληροφορίες",
};
} else {
var browzine = {
libraryId: "XXX",
apiKey: "ENTER API KEY",
version: 2, // Required for the other parameters below to work after December 15, 2021.
articlePDFDownloadLinkEnabled: true,
articlePDFDownloadWording: "View Now",
articlePDFDownloadLinkText: "PDF",
articleLinkEnabled: true,
articleLinkTextWording: "View Now",
articleLinkText: "Article Page",
articleBrowZineWebLinkTextEnabled: true,
articleWording: "View in Context",
articleBrowZineWebLinkText: "Browse Journal",
journalBrowZineWebLinkTextEnabled: true,
journalWording: "View the Journal",
journalBrowZineWebLinkText: "Browse Now",
printRecordsIntegrationEnabled: true,
showFormatChoice: false,
showLinkResolverLink: true,
enableLinkOptimizer: true,
unpaywallEmailAddressKey: "YourUniversityEmail@greatuniversity.edu",
articlePDFDownloadViaUnpaywallEnabled: true,
articlePDFDownloadViaUnpaywallWording: "View Now (via Unpaywall)",
articlePDFDownloadViaUnpaywallLinkText: "PDF",
articleLinkViaUnpaywallEnabled: true,
articleLinkViaUnpaywallWording: "View Now (via Unpaywall)",
articleLinkViaUnpaywallLinkText: "Article Page",
articleAcceptedManuscriptPDFViaUnpaywallEnabled: true,
articleAcceptedManuscriptPDFViaUnpaywallWording: "View Now (Accepted Manuscript via Unpaywall)",
articleAcceptedManuscriptPDFViaUnpaywallLinkText: "PDF",
articleAcceptedManuscriptArticleLinkViaUnpaywallEnabled: true,
articleAcceptedManuscriptArticleLinkViaUnpaywallWording: "View Now (via Unpaywall)",
articleAcceptedManuscriptArticleLinkViaUnpaywallLinkText: "Article Page",
articleRetractionWatchEnabled: true,
articleRetractionWatchTextWording: "Retracted Article",
articleRetractionWatchText: "More Info",
articleExpressionOfConcernEnabled: true,
articleExpressionOfConcernWording: "Expression of Concern",
articleExpressionOfConcernText: "More Info",
};
}
browzine.script = document.createElement("script");
browzine.script.src = "https://s3.amazonaws.com/browzine-adapters/summon/browzine-summon-adapter.js";
document.head.appendChild(browzine.script);
Theoretically this same approach could be extended to multiple languages by simply repeating the first if statement with additional codes as many times as needed.
After modifying your script as shown above, please upload and deploy it as covered in our main Ex Libris Summon Overview and Step-by-Step Installation Guide article. If you’re having problems seeing the integration or seeing the correct language text displayed after doing so, please contact us for assistance and include your script file as an attachment in your email.