Summon Integration (Multiple Language Support)

Please review our general 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:

1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 if(window.location.href.indexOf("gr-GR") > -1) { var browzine = { api: "", apiKey: "ENTER API KEY", journalWording: "Δείτε το Περιοδικό", articleWording: "Δείτε το Πλήρες Τεύχος", journalBrowZineWebLinkText: "Πλοηγηθείτε Τώρα", articleBrowZineWebLinkText: "Πλοηγηθείτε Τώρα", articlePDFDownloadLinkEnabled: true, articlePDFDownloadWording: "Το Άρθρο σε PDF", articlePDFDownloadLinkText: "Κατεβάστε το Τώρα", articleLinkEnabled: true, articleLinkTextWording: "Σύνδεσμος στο Άρθρο", articleLinkText: "Διαβάστε το Άρθρο", }; } else { var browzine = { api: "", apiKey: "ENTER API KEY", journalWording: "View the Journal", articleWording: "View Complete Issue", journalBrowZineWebLinkText: "Browse Now", articleBrowZineWebLinkText: "Browse Now", articlePDFDownloadLinkEnabled: true, articlePDFDownloadWording: "Article PDF", articlePDFDownloadLinkText: "Download Now", articleLinkEnabled: true, articleLinkTextWording: "Article Link", articleLinkText: "Read Article", }; } browzine.script = document.createElement("script"); browzine.script.src = ""; 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 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.