The Cobrowse experience is supported in multiple languages.

Adding Locale data

To add another language

window.Cobrowse.modal.addL18nLocale(localNames: string[], values: {  [keywords: string]: string })

Example

// example for adding French locales "fr" and "fr-CA"
window.Cobrowse.modal.commandQueue.push(async () => {
  const frLocaleData = {
      START_CB_PROMPT: "Entrez votre NIP pour démarrer une session de co-navigation",
      ACCEPT_CB_BUTTON: "Acceptez",
      REJECT_CB_BUTTON: "Rejeter",
      END_CB_BUTTON: "Fin",
      CB_SESSION_INFO: "Vous êtes dans une session de co-navigation",
      ACCEPT_PERMISSION_BUTTON: "Acceptez",
      DENY_PERMISSION_BUTTON: "Nier",
      LASERPOINTER_DIALOG: "a demandé la permission de dessiner un pointeur laser sur votre écran",
      HIGHLIGHTER_DIALOG: "a demandé la permission de dessiner avec un surligneur sur votre écran",
      INVALID_PIN_PROMPT: "Cette broche était invalide, veuillez retaper votre broche",
      SCOPE_EXPLANATION: "Une session de co-navigation ne partage que ce site Web avec un agent",
      PRIVACY_EXPLANATION: "Les éléments en surbrillance contenant cette icône de verrou sont confidentiels et ne sont pas visibles par l'agent de navigation simultanée.",
      UNSUPPORTED_BROWSER_EXIT_BUTTON: "Fermer ScreenMeet",
      UNSUPPORTED_BROWSER_PROMPT: "Désolé! ScreenMeet n'est pas pris en charge dans ce navigateur",
      CONFIDENTIAL: 'Confidentiel'
  };
  window.Cobrowse.modal.addL18nLocale(["fr","fr-CA"], frLocaleData)
})

Manually set locale

By default Cobrowse will use the “lang” attribute of the page html tag to switch languages. However, if necessary it can be switched manually using the following function.

window.Cobrowse.modal.setLocale(locale: string);

Default

const defaultLocaleData = {
  START_CB_PROMPT: 'Enter your pin to start a co-browse session',
  UNSUPPORTED_BROWSER_PROMPT: 'Sorry! ScreenMeet is not supported in this browser',
  ACCEPT_CB_BUTTON: 'Accept',
  REJECT_CB_BUTTON: 'Reject',
  END_CB_BUTTON: 'End',
  CB_SESSION_INFO: 'You are in a co-browse session',
  ACCEPT_PERMISSION_BUTTON: 'Accept',
  DENY_PERMISSION_BUTTON: 'Deny',
  LASERPOINTER_DIALOG: 'has requested permission to draw a laser pointer on your screen',
  HIGHLIGHTER_DIALOG: 'has requested permission to draw with a highlighter on your screen',
  UNSUPPORTED_BROWSER_EXIT_BUTTON: 'Close ScreenMeet',
  INVALID_PIN_PROMPT: 'That pin was invalid, please retype your pin',
  SCOPE_EXPLANATION: 'A co-browse session shares only this website with an agent',
  PRIVACY_EXPLANATION:
    'Elements highlighted containing this lock icon are confidential and not visible to the co-browse agent',
  CONFIDENTIAL: 'Confidential',
};
window.Cobrowse.modal!.addL18nLocale(["en","en-us"], defaultLocaleData);

Feedback

Was this helpful?

Yes No
You indicated this topic was not helpful to you ...
Could you please leave a comment telling us why? Thank you!
Thanks for your feedback.

Post your comment on this topic.

Post Comment