Crownpeak Employee
Crownpeak Employee

How to use granular translation files

    To support use of the smaller translation files we  have a new flag option:


    This is a boolean (true/false) flag. If the flag is missing or set to "false" the scripts will use the current (legacy) language scripts. If the flag is set to true (window.evidon.usegranulartranslations = true;) the scripts will attempt to use the new "granular" translation file format.

    Note that for this to work the "Smaller Translation Files" product feature has to be enabled as well, so any customer who wants this option will need to coordinate this with their CSM so they can get that flag enabled for their account.

    The recommended process for this would be:

    • Customer lets their CSM know they want to enable this option
    • CSM enables the option for the customer Company (customer)
    • Translations need to be re-saved
    • Company then updates their script by adding the flag mentioned above into their root script. This needs to be in the root script.

    The scripts are configured so if the flag is enabled but the target translation file isn't present we will fall back to the legacy translation file. When this happens we show a message in the console saying the file is missing (they will get a 404 error too).

    While this is a necessary option for some customers it may slow down the overall script loading for other customers. Currently we try to pull the translation files as soon as the main script executes. With this flow we can't do that and we are forced to wait for the main script to load as well as the settings script. This may add a bit of an additional delay in how long it takes from the time the page loads to when the banner is displayed. At the moment we don't have specific guidance for when there may be performance gains by switching to the smaller scripts so customers will need to do their own experimentation.

    Labels (1)

    Can't find what you are looking for?

    Find Answers

    Search our DG Forum to find answers to questions asked by other DG users.

    Ask a Question

    No luck? Ask a question. Our Product and Support teams are monitoring the Forum and typically respond within 48 hours.

    Ask a Question