Support » Plugin: GDPR Cookie Consent Banner » Make options for the banner text work in WPML

  • Hi,

    I am a web developer at Talend, and we are using your plugin on our site, which is also using WPML. Since we have several active languages we would like to display the banner text in each language, but the site options are entirely global. When switch to the french site and edit the text to the french translation, it would update on all the other languages as well.

    Can you extend your plugin to make it WPML aware? It should detect wpml and append the language code (ICL_LANGUAGE_CODE constant) to the get_option() and add_settings_section() calls, or some default code if wpml is not active.

    Please let me know if you can implement this feature or if you would like help in doing so.

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

Viewing 4 replies - 1 through 4 (of 4 total)
  • Im not going to lie to you, i definetely think this is the best cookie plugin out there, i like the style and everything. It is a pitty it is not WPML compatible, and im being “forced” to use a different one for my multilingual projects, whcih lately tend to be a lot.

    I would even do a donation if you could make it WPML compatible.

    Thanks
    Kind regards

    Well, i found out it is already “compatible” with WPML although is a bit tricky but it works.

    Could you please explain a bit more? How would you get different banner text for each language?

    Yes, sure:

    – Step 1: Go to WPML –> Themes and Plugins Localization

    – Step 2: Tell WPML to search for strings in all the plugins and Themes:
                2.1: Select the checkboxes in “Strings in the themes” then press the button “Scan selected themes for strings”. Wait until it finishes.
                2.2: Select the checkboxes in “Strings in the plugins” then press the button “Scan selected plugins for strings”. Wait until it finishes.

    – Step 3: Here is when it comes the tricky part. Go to string translations, and search in all strings (no filters applied). Search for the text you put in your GPDR banner (normally the word cookies will be enough).

    The reason why is tricky is because it will find your strings to be translated, but not under the plugin strings, but under the theme, somewhere in the Data Base, so that is why you should search for all possible strings (to do not filter out anything simply don’t filter by strings to be searched or domain).

    In fact you will find your strings to be translated under the domain: admin_texts_ctcc_content_settings and under the name [ctcc_content_settings]notification_text

    It worked fine for me, and now I can show different strings for each country.

    Hope that helps.

    • This reply was modified 8 months, 2 weeks ago by andresmolina.
    • This reply was modified 8 months, 2 weeks ago by andresmolina.
    • This reply was modified 8 months, 2 weeks ago by andresmolina.
    • This reply was modified 8 months, 2 weeks ago by andresmolina.
    • This reply was modified 8 months, 2 weeks ago by andresmolina.
    • This reply was modified 8 months, 2 weeks ago by andresmolina.
    • This reply was modified 8 months, 2 weeks ago by andresmolina.
    • This reply was modified 8 months, 2 weeks ago by andresmolina.
Viewing 4 replies - 1 through 4 (of 4 total)
  • The topic ‘Make options for the banner text work in WPML’ is closed to new replies.