• Resolved elales

    (@elales)


    The basic language of my site is Polish and I’m using WPML for English version. I’ve installed Cookie Notice and it’s authomatically installed in Polish language. It shows cookie message in Polish on both Polish and Egnlish versions of the site. How to achieve the English message on the English site? As I learned WPML requires the basic language to be English. Now, when the plugin is already in Polish I have nothting to translate in WPML. But no English notice as well.
    Thanks.

    https://www.ads-software.com/plugins/cookie-notice/

Viewing 9 replies - 1 through 9 (of 9 total)
  • Plugin Author dFactory

    (@dfactory)

    It depends on your WPML settings basically. WPML suggest that the strings should be in english, but it’s not required.

    You could also remove all the strings. Set default language to english, switch admin language to english and then activate the CN again.

    There’s some juggling in WPML String translation required but you should handle that.

    Thread Starter elales

    (@elales)

    Thanks for the answer. I tried removing the strings, deinstalling and instaling again Cookie Notice after switching the site to English but it didn’t help. The plugin keeps installing in Polish. I see that I need to learn more about WPML…

    Plugin Author dFactory

    (@dfactory)

    Yeah, just play with it. CN is WPML compatible, but you have to get into WPML itself to make it work.

    Good luck

    how can I translate my custom cookie message in all languages available on my site? Cookie-notice uses the same message on all languages.

    Plugin Author dFactory

    (@dfactory)

    Use string translation tool.

    Thanks, but I don’t have string translation tool in my WPML “blog” version. It should work without string translation tool, saving a separate option for each language.
    Please consider to switch to this mode for multilanguage ina future release.

    Thanks, Daniele-

    Plugin Author dFactory

    (@dfactory)

    Thats what string translation tools are for – in both WPML and Polylang, to enable translation of plugin options.

    That’s true, but this makes cookie-notice compatible only with the premium version of wpml and not even the cheapest one.
    I’ve modified your code a little, just to parametrize the plugin options name so I can have an option saved in the db for each language setted up in WPML.
    Let me know if it can be of some interest to you.

    Thanks again for your quick support.

    Plugin Author dFactory

    (@dfactory)

    Thank you for this Daniele – it could work like you propose, but from my perspective string translation is inevitable in any website creation.

    Current solution is also works consistently in WPML and Polylang and we’d like to stay with it.

    But as you feel comfortable with WP coding you could easilly achieve what you want without modifying the plugin. Just make use of cn_cookie_notice_args filter hook – it allows you to dynamically modify any plugin options including the texts. You could adjust that on the fly for each of the languages you have, or even store and get the strings from DB.

Viewing 9 replies - 1 through 9 (of 9 total)
  • The topic ‘Bilingual site with WPML’ is closed to new replies.