• Resolved marianssen

    (@marianssen)


    Hi,

    I’m trying to translate the “Agree” button that is shown, when GDPR consent is turned on. I couldn’t find the string in plugin settings or in Loco translate.

    Could you point me in the right direction?

Viewing 3 replies - 1 through 3 (of 3 total)
  • Hi @marianssen,

    Thank you so much for getting in touch, we really appreciate your time.

    Might I kindly suggest perhaps making use of some custom JavaScript to help achieve this?

    Please navigate to -> Maps -> Settings -> Advanced Settings -> Please copy and paste the below script into the custom JS field:

    jQuery(window).load(function(){
    	jQuery(".wpgmza-api-consent").text("New Text Here");
    });

    Once complete, please save the settings and confirm?

    Kindly note, the above may require a few changes depending on your website.

    Kindest regards,
    Steven De Beer

    Thread Starter marianssen

    (@marianssen)

    Hi @stevendebeer,

    thank you for your reply. Unfortunately, the code you have provided does not work, because the Google Map API gets loaded later, so the text does not change. It does work with a timeout function though.

    $(document).ready(function() {
            setTimeout(function() {
                if ($('.wpgmza-gdpr-compliance').length){
                    $('.wpgmza-api-consent').text('TEXT');
                }
            }, 2000);
            
        });

    However, this is not a very effective solution – this string should be included in translations.

    • This reply was modified 4 years, 4 months ago by marianssen.

    Hi @marianssen,

    Thank you so much for getting back to me.

    I have added this to our development schedule so we will kindly be looking at including this in the translation files for a future update of WP Google Maps.

    The script is more of workaround for now but we will be look at this inclusion so that you are aware.

    I hope this helps?

    Kindest Regards,
    Steven De Beer

Viewing 3 replies - 1 through 3 (of 3 total)

The topic ‘Translate GDPR “Agree” button’ is closed to new replies.