Skip to main content
ExLibris

Knowledge Assistant

BETA
 
  • Subscribe by RSS
  • Back
    Primo

     

    Ex Libris Knowledge Center
    1. Search site
      Go back to previous article
      1. Sign in
        • Sign in
        • Forgot password
    1. Home
    2. Primo
    3. Community Knowledge
    4. How to - Customize LibKey Discovery labels according to the language of Primo UI

    How to - Customize LibKey Discovery labels according to the language of Primo UI

    1. Last updated
    2. Save as PDF
    3. Share
      1. Share
      2. Tweet
      3. Share
    1.  
    2. English UI
    3. French UI
    Created By: François Renaville
    Created on: 6/23/2020



    LibKey Discovery labels proposed in the default javascript code for Primo don't support multilingual interfaces. Using the default code will necessarily display the same labels whatever the selected language of Primo UI.

    You can customize the labels by removing/commenting the following lines from the default code:

        journalBrowZineWebLinkText: "View Journal Contents",
        articleBrowZineWebLinkText: "View Issue Contents",
        articlePDFDownloadLinkText: "Download PDF",
        articleLinkText: "Read Article",
        articlePDFDownloadViaUnpaywallText: "Download PDF (via Unpaywall)",
        articleLinkViaUnpaywallText: "Read Article (via Unpaywall)",
        articleAcceptedManuscriptPDFViaUnpaywallText: "Download PDF (Accepted Manuscript via Unpaywall)",
        articleAcceptedManuscriptArticleLinkViaUnpaywallText: "Read Article (Accepted Manuscript via Unpaywall)",

    and by updating section:

    app.controller('prmSearchResultAvailabilityLineAfterController', function($scope) {
    window.browzine.primo.searchResult($scope);
    });

    like here below. Just put the desired language codes under 'case', translate the labels and select default labels to display in case there is no language parameter in the URL:

    • for Primo VE (ISO 639-1) : en, fr, de...
    • for Primo BO : en_US, fr_FR, de_DE...

    Code example:

      app.controller('prmSearchResultAvailabilityLineAfterController', function ($scope) {
        var expr = $scope.$ctrl.parentCtrl.$stateParams.lang;
        switch (expr) {
          case 'en':
            window.browzine.journalBrowZineWebLinkText = "View Journal Contents";
            window.browzine.articleBrowZineWebLinkText = "View Issue Contents";
            window.browzine.articlePDFDownloadLinkText = "Download PDF";
            window.browzine.articleLinkText = "Read Article";
            window.browzine.articlePDFDownloadViaUnpaywallText = "Download PDF (via Unpaywall)";
            window.browzine.articleLinkViaUnpaywallText = "Read Article (via Unpaywall)";
            window.browzine.articleAcceptedManuscriptPDFViaUnpaywallText = "Download PDF (Accepted Manuscript via Unpaywall)";
            window.browzine.articleAcceptedManuscriptArticleLinkViaUnpaywallText = "Read Article (Accepted Manuscript via Unpaywall)";
            break;
          case 'fr':
            window.browzine.journalBrowZineWebLinkText = "Contenu du périodique";
            window.browzine.articleBrowZineWebLinkText = "Contenu du fascicule";
            window.browzine.articlePDFDownloadLinkText = "PDF en 1 clic";
            window.browzine.articleLinkText = "Lire l'article";
            window.browzine.articlePDFDownloadViaUnpaywallText = "PDF en 1 clic (via Unpaywall)";
            window.browzine.articleLinkViaUnpaywallText = "Lire l'article (via Unpaywall)";
            window.browzine.articleAcceptedManuscriptPDFViaUnpaywallText = "PDF en 1 clic (version acceptée via Unpaywall)";
            window.browzine.articleAcceptedManuscriptArticleLinkViaUnpaywallText = "Lire l'article (version acceptée via Unpaywall)";
            break;
          default:
            window.browzine.journalBrowZineWebLinkText = "Contenu du périodique";
            window.browzine.articleBrowZineWebLinkText = "Contenu du fascicule";
            window.browzine.articlePDFDownloadLinkText = "PDF en 1 clic";
            window.browzine.articleLinkText = "Lire l'article";
            window.browzine.articlePDFDownloadViaUnpaywallText = "PDF en 1 clic (via Unpaywall)";
            window.browzine.articleLinkViaUnpaywallText = "Lire l'article (via Unpaywall)";
            window.browzine.articleAcceptedManuscriptPDFViaUnpaywallText = "PDF en 1 clic (version acceptée via Unpaywall)";
            window.browzine.articleAcceptedManuscriptArticleLinkViaUnpaywallText = "Lire l'article (version acceptée via Unpaywall)";
            break;
        }
        window.browzine.primo.searchResult($scope);
      });

     

    English UI

    French UI




    Report
    View article in the Exlibris Knowledge Center
    1. Back to top
      • How to - Add links to additional search platforms in Primo Brief Results
      • How to - Display Open Access and Restricted Access indicators in Primo VE
    • Was this article helpful?

    Recommended articles

    1. Article type
      Topic
      Community Content Type
      How To
      Product
      Primo
    2. Tags
      This page has no tags.
    1. © Copyright 2025 Ex Libris Knowledge Center
    2. Powered by CXone Expert ®
    • Term of Use
    • Privacy Policy
    • Contact Us
    2025 Ex Libris. All rights reserved