Viewing 6 posts - 1 through 6 (of 6 total)
  • Author
    Posts
  • #1252233

    Hi

    I am using Enfold theme and the WPML plugin. Default Language is German, and the second language is English. The German “Datenschutzerklärung” is the Original and the “Privacy Statement” the translation using WPML String Translation.

    In the beginning, the English Privacy Statement contains a disclaimer with a link to the German original. But the link within the text element … here … I can’t get it working as desired.

    When I create a link to /Datenschutzerklaerung or https://domainname.com/datenschutzerklaerung on the frontend the link refresh screen and always shows the English one instead of the German.

    Trying to use the German page ID https://domainname.com/post.php?post=3 leads to 404 messages.

    Is there a way to overruling the language setting to use a link to the counterpart page in the other language?

    Many thanks,
    Andreas

    #1252614

    Hey Andreas,

    Best regards,
    Victoria

    #1252634

    Hi Victoria

    Yes, you are right. If the language is set to German, the German “Datenschutzerklärung” is shown. If the language is set to English, the English Privacy Statement is shown. That is fine, but this was not my problem and question.

    At the top of the English Privacy Statement, there is a Legal Disclaimer which says that the German one is the original statement and it offers a link “here” to the German counterpart page.

    The question is; I there a way, and if yes how do I have to configure the link behind the text *here” to open the German “Datenschutzerklärung” in a new window.

    Thanks.
    Andreas

    #1253784

    Hi,

    Thank you for the inquiry.

    Have you tried adding the language code (de) in the URL, or add it as a query? Example:

    http://domainname.com/datenschutzerklaerung?lang=de
    https://domainname.com/de/datenschutzerklaerung 
    

    This might depend on the current URL settings in the WPML panel, but it’s worth a try.

    Best regards,
    Ismael

    #1253896

    Hi Ismael

    Thanks for your message.

    Yes, I tried these variants, but it does not solve my problem.

    Now I asked WPML support and got a solution. What I learned:

    The default behaviour of “WPML” is to translate the link to show the English version, and only the language switcher is there to change the language. In the page in question, I basically want to have a link that should act as a language switcher. That does not work. The solution to overrule the WPML language is by setting a blacklist. For that, I added the code below to functions.php

    add_filter( \’wpml_sl_blacklist_requests\’, \’wpml_sl_blacklist_requests\’, 10, 2 );

    function wpml_sl_blacklist_requests( $blacklist, $sitepress ) {
    $blacklist[] = \’datenschutzerklaerung\’;
    return $blacklist;
    }

    Then I opened the page and saved it again.

    With that solution, it works as desired.

    Thanks.
    Andreas

    • This reply was modified 4 years, 1 month ago by Andreas.
    #1254000

    Hi Andreas,

    Glad you got it working for you and thank you for sharing! :)

    If you need further assistance please let us know.

    Best regards,
    Victoria

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