Home > Advanced Features > Integration Code Modes

Integration Code Modes

The Localizer integration code is extremely flexible and can be customized to meet the needs of your website.

Here are two ways you can adjust the code:

A. Cache All Language Data
With this function, you can cache all the data on your website for whatever language you translate to. This means that translated data for the entire website will be stored in a user’s browser and ready to display once they visit any page, reducing load times.


You can also choose to turn this off. Once turned off, only the data for the page the user has visited will be translated and every subsequent request will be sent back to the server, prompting slower loading times. To turn this function on or off, simply follow the steps below:


  1Locate the Localizer Javascript snippet that you’ve installed on your website.
 

<!-- Localizer Integration Code -->
<script type="text/javascript" src="https://localizercdn.com/localizer.js"></script>
<script>
    Localizer.init({
        siteId: 12345678912345,
        cacheall: true,
        detectnew: true

 
 
2Beside “cacheall”, change the value to “true” if you would like to turn it on, or “false” if you’d like to turn it off.

 

<!-- Localizer Integration Code -->
<script type="text/javascript" src="https://localizercdn.com/localizer.js"></script>
<script>
    Localizer.init({
        siteId: 12345678912345,
       
cacheall: true,
        detectnew: true

 

B. Detect New Phrases

Once you’ve translated the existing content on your website, Localizer will detect any new content that has been added and place it in your Phrases dashboard as Untranslated Phrases. If subscribed, you’ll also receive email reminders about these. You can choose to turn this detection of new content on or off by following the same steps as above, except enter the "true" or "false" values beside “detectnew” in this case.  

 

<!-- Localizer Integration Code -->
<script type="text/javascript" src="https://localizercdn.com/localizer.js"></script>
<script>
    Localizer.init({
        siteId: 12345678912345,
        cacheall: true,
       
detectnew: false