Jump to: navigation, search

Localization

Genesys Co-browse localization is split into three parts:

  • Master UI
  • Built-in Chat UI
  • Slave UI

Co-browse is localized for English by default. To modify the default English localization or add localization for other languages, you must host the localization files on your servers and configure the Co-browse application to use these files on top of the defaults.

The localization files are plain JSON files, loaded through a JSONP request. This means they can be hosted on any domain, as long as JSONP is supported by the hosting server. Co-browse uses a standard callback argument for the callback function name.

Localizing the Master, Integration, and Chat Widget UI

To configure the master UI of Co-browse to use custom localization files, you must pass the URL(s) of the file(s) to the localization option of the appropriate subsection of the JavaScript configuration API such as the _genesys variable. See Integrated JavaScript Application#Configuration and Integrated JavaScript Application#Localization of Chat and Co-browse.

Important
You must save localization JSON files with UTF-8 encoding.

For details about chat widget localization see the following:

Localizing the "Live Chat" and "Co-browsing" buttons

The "Live Chat" and "Co-browsing" default buttons are images and localization changes will not affect the text on these buttons. Instead, you can localize the buttons using one of the following methods:

  1. Provide custom localized buttons instead of the defaults. See Integrated JavaScript Application#Providing Custom HTML for Buttons for details.
  2. Override how the buttons look using CSS. See Customizing the CSS for details.

Localizing the slave UI

The slave UI is localized by updating the localization configuration option to the URL of the JSON localization file in the slave section of the Co-browse Server application. Unlike the master UI, the value is changed in the Genesys Configuration server and not via the instrumentation script.

Caching and updating l10n files

Requests to the l10n files are made on every page that is instrumented with Co-browse, before the Co-browse UI is displayed. Genesys recommends that you implement a caching mechanism for these files if you host them on your servers.

For best performance, add far-future expiration headers (for example, Expires, Cache-Control or both) to your l10n files. This prevents the browser from requesting these files on each page. Instead, it will take them from the cache. This reduces the start-up time for the Co-browse UI and cuts down traffic for the end user. If you modify a localization file with a far-future expiration header, the browser must request the new version of the file from the server instead of taking it from the cache. To force the browser to do this you must change the URL of the file. You can do this by updating the corresponding localization parameter in Co-browse instrumentation after either putting the modified file in a new directory or updating the file's name.

For example, consider the case where you have set up your own server to host the Co-browse localization files for the master UI:

<script>
var _genesys = {
    cobrowse: {
        localization: '//example.com/cobrowse-l10n/2014-09-07/cobrowse-fr.json'
    }
};
</script>
<COBROWSE_INSTRUMENTATION_SCRIPT>

Next, you modify some of your localization files and want them to be refreshed for all users, so you create a new directory and update your Co-browse instrumentation:

<script>
var _genesys = {
    cobrowse: {
        localization: '//example.com/cobrowse-l10n/2014-10-08/cobrowse-fr.json'
    }
};
</script>
<COBROWSE_INSTRUMENTATION_SCRIPT>

Now, any browsers that had cached the files will be reload the files and re-cache them.

Built-in localization

This section lists the default localization values and keys.

You can use the code snippets in this section to create your own localization files. To do so, copy and save the code snippet as a .json file.

Important
You must save your localization JSON files using UTF-8 encoding.
Tip
It is not necessary to list all the keys in your localization JSON file. In your JSON file, you can specify only the keys you wish to override. Any key not specified will use the default localization value.

Master UI

{
  "agentJoined": "Representative has joined the session",
  "youLeft": "You have left the session. Co-browse is now terminated.",
  "sessionTimedOut": "Session timed out. Co-browse is now terminated.",
  "sessionInactiveTimedOut": "Session timed out. Co-browse is now terminated.",
  "agentLeft": "Representative has left the session. Co-browse is now terminated.",
  "sessionError": "Unexpected error occured. Co-browse is now terminated.",
  "sessionStarted": "Your co-browse session ID is {sessionId}. Please spell it to our representative to continue with co-browsing.",
  "navRefresh": "Representative has refreshed the page. Reloading.",
  "navBack": "Representative has pressed the \"Back\" button. Reloading page.",
  "navForward": "Representative has pressed the \"Forward\" button. Reloading page.",
  "navUrl": "Representative has requested navigation. Reloading page.",
  "navFailed": "Navigation request by representative has failed.",
  "toolbarContent": "Session ID: {sessionId}",
  "contentMasked": "Content is hidden from representative",
  "contentMaskedPartially": "Some content is hidden from representative",
  "exitBtnTitle": "Exit Co-browse session",
  "areYouOnPhone": "Are you on the phone with our representative?",
  "areYouOnPhoneOrChat": "Are you on the phone or chat with our representative?",
  "connectBeforeCobrowse": "You need to be connected with our representative to continue with co-browsing. Please call us or start a live chat with us, and then start Co-browse again.",
  "sessionStartedAutoConnect": "Co-browse session started. Waiting for representative to connect to the session…",
  "browserUnsupported": "Unfortunately, your browser is not currently supported.<br><br> Supported browsers are: <ul><li><a target='_blank' href='http://www.google.com/chrome'>Google Chrome</a></li><li><a target='_blank' href='http://www.firefox.com/'>Mozilla Firefox</a></li><li><a target='_blank' href='http://microsoft.com/ie'>Internet Explorer 9 and above</a></li><li><a target='_blank' href='https://www.apple.com/safari'>Safari 6 and above</a></li></ul>",
  "chatIsAlreadyRunning": "Chat is already running on another page.",
  "modalYes": "Yes",
  "modalNo": "No"
}

Chat Widget

See Chat Widget JS API#Localization

Slave

{
  "invalidSessionID": "Session ID is invalid or has expired.",
  "navRefresh": "Refresh is pressed. Reloading page.",
  "navBack": "Back is pressed. Reloading page.",
  "navForward": "Forward is pressed. Reloading page.",
  "youLeft": "You have left the session. Co-browse is now terminated.",
  "customerLeft": "Customer has left the session. Co-browse is now terminated.",
  "exitBtnText": "Exit Session",
  "sessionIdText": "Session ID: {sessionId}",
  "enterSessionIdText": "Session ID:",
  "modeWrite": "Mode: Write",
  "modePointer": "Mode: Pointer",
  "downgradeToPointer": "Downgrade to pointer mode",
  "navigationDenied": "Navigation request has failed.",
  "maskedNodeTitle": "This content is visible only to customer",
  "unsupportedNodeTitle": "Some data is missing due to Co-browse limitations"
}
This page was last edited on December 5, 2014, at 08:08.
Comments or questions about this documentation? Contact us for support!