• Resolved Anonymous User 20572805

    (@anonymized-20572805)


    Using Custom URL at Wizard > Documents Cookie Policie and others, having Polylang installed, you can’t get URL tanslations on Banner.

    With Loco Translate sure you can translate the names of policies (e.g. Privacy Policy > Datenschutzerkl?rung) but not links themselves. If you point your mouse on Policy you get only link entered in Custom URL string, but no translations.

    In the class-field.php file the value $show_url_field is set to === ‘url’, so there’s no way to input pll__ translation values.

    Is there a solution to the issue?

    Thank you in advance.

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

Viewing 4 replies - 16 through 19 (of 19 total)
  • Thread Starter Anonymous User 20572805

    (@anonymized-20572805)

    @rogierlankhorst
    I had tried back then to implement a Polylang code with the Custom URL into plugin’s cookiebanner.php file. So after it could be translated as usual with the help of adding Polylang strings to functions.php.

    So instead of that:

    <a class="cmplz-link cookie-statement" href="#" data-relative_url="">{title}</a>

    You get that:

    <a class="cmplz-link cookie-statement" href="<?php <strong>pll_e</strong>("https://mpro.company/en/privacy-cookie/","complianz-gdpr")?>" data-relative_url="">{title}</a>

    But you have doubled URLs href="#" with data-relative_url="". So after implementation I got doubled strings. Now I can’t prove it though..

    I overcame plugin URL translation issue by creating empty pages with 301 redirect on actual policies. It took a lot of time of course to make it on all websites instead of one translation. But nothing doing…

    If you’d implement the Custom URL translation in Polylang strings somehow or in your .php coding, I’d appreciate that. And all your customers would I’m sure.

    But anyway thanks for your nice and well developed plugin ??

    • This reply was modified 2 years ago by Anonymous User 20572805.
    • This reply was modified 2 years ago by Anonymous User 20572805.
    • This reply was modified 2 years ago by Anonymous User 20572805.
    • This reply was modified 2 years ago by Anonymous User 20572805.
    Plugin Author Rogier Lankhorst

    (@rogierlankhorst)

    @mprowebstudio thanks for your explanation and example, this makes it more clear to me. I’ve created a branch which pulls the URL through the cmplz_translate() function, which runs pll_e if it exists.

    https://github.com/Really-Simple-Plugins/complianz-gdpr/tree/translatable-URLs2

    Hope this works as expected!

    I’m not surprised that your example didn’t work, as the href is dynamically populated in the javascript. This branch translates the array that is used by that javascript.

    Plugin Author Rogier Lankhorst

    (@rogierlankhorst)

    @mprowebstudio did you have the chance to check the above branch? As this seems to do exactly what you were trying to achieve, I’ll markt this as resolved, but let me know if there’s anything else I can do here.

    Thread Starter Anonymous User 20572805

    (@anonymized-20572805)

    Sorry for the long delay,

    as mentioned above, I solved URL translation issue by creating empty pages with 301 redirect on actual policies. So unfortunately I had no chance to try your last branch. Hope, it works.

    Thank you:)

Viewing 4 replies - 16 through 19 (of 19 total)
  • The topic ‘Custom URL Tanslation doesn’t work at “Wizard > Documents > Policies”’ is closed to new replies.