Support » Plugin: The GDPR Framework By Data443 » Spanish translation pop up does not show

  • Resolved gijsdros

    (@gijsdros)


    Hi,
    I am having troubles with my Spanish translation; the message in the cookie popup is not translated (stays in the main language, which is English). Some pages I have also in French and German and I do not see the problem there. I use WPML. I can also not change the message in the plugin admin area because than it will change it for all languages. Thank you for your help.
    Thanks,
    Gijs

    The page I need help with: [log in to see the link]

Viewing 5 replies - 1 through 5 (of 5 total)
  • Thanks for letting us know. We’ll get right on that.

    Hi @gijsdros

    We have answered your question here:
    https://data443.atlassian.net/browse/SD-181

    You need to add short-code to display text according to language.
    For example for WPML : You can add this code to the current working theme’s function.php

    add_shortcode( ‘wpml_language’, ‘wpml_find_language’);

    function wpml_find_language( $attr, $content = null ){

    extract(shortcode_atts(array(

    ‘language’ => ”,

    ), $attr));

    $current_language = ICL_LANGUAGE_CODE;

    if($current_language == $language)

    { $output = do_shortcode($content); }
    else

    { $output = “”; }
    return $output;
    }

    You can add short-code like this http://prntscr.com/m26qfm

    [wpml_language language=”en”]
    English
    [/wpml_language]

    [wpml_language language=”it”]
    Italian
    [/wpml_language]

    You can see the content according to language at the front end. In this case, you will get “English” for the English language. and “Italian” for the Italian language.

    Also, I have checked the page https://www.villasriomar.com/es/sobre-hotel/
    And get that the scripts and CSS are missing for some reason on these pages.
    Missing js and CSS are follow:

    cookieconsent.min.css
    cookieconsent.min.js
    cookieconsent.js

    I don’t think its problem with plug-in because it this is plug-in problem then it will not work on other pages also.
    You can try this in function.php maybe this will work for you.

    if(is_page( 31628 ))
    {
    popup_gdpr();
    }

    if this will not work then please remove this.

    Hi again,
    I tried your solution (function.php & shortcode) but it did not work.
    The shortcode appears in the popup as written.
    I can not enter the atlassian link you sent; I tried to login several times but my email address does not have access. Is their any additional information via this link or why did you add it?
    Thanks,
    Gijs

    @gijsdros no additional information as I cut and paste the same answer directly in this thread. Have relayed your response to support.

    Please confirm that you have added function above on correct file.
    I have setup an environment with divi theme and almost same plugin used by you but didn’t get any such issue.
    There may be possibility that you have added the code at wrong place? or use it in wrong manner?
    Please respond to support@data443.com so we can better assist you most directly and promptly. Thank you!

Viewing 5 replies - 1 through 5 (of 5 total)
  • You must be logged in to reply to this topic.