• Resolved marcguenther

    (@marcguenther)


    We use TranslatePress and also the “Email Address Encoder” plugin by Till Krüss, which encodes all email addresses.

    Unfortunately, TranslatePress then does not recognise them as email addresses anymore, tries to translate them, and destroys them completely in the process.

    Any idea on how to fix that?

Viewing 8 replies - 1 through 8 (of 8 total)
  • Greetings,

    Apologies for not getting back to you any sooner.

    For doing this you should be able to Exclude this field’s selector from translation.

    To use this feature, please follow these steps:

    1. Navigate to your WordPress Dashboard, then go to Settings > TranslatePress.
    2. In the TranslatePress settings, click on the “Advanced” tab.
    3. Scroll down to the “Exclude Selectors” section.
    4. In the text input field, enter the CSS selectors corresponding to the elements that you want to exclude from translation. If you need to exclude multiple elements, please separate the selectors with commas.

    For example, if you want to exclude a search input field with an ID “search-field”, you would enter?#search-field?in the field.

    Let me know if this worked for you.

    Best Regards,

    Thread Starter marcguenther

    (@marcguenther)

    Not sure I understand. I am not talking about a single field with an id, but about all email addresses on the site. These are all in an A tag, with an HREF starting with mailto:

    What would be a selector for that? I couldn’t find one. If I simple put “a”, it will not translate any links anymore, which is not what I want.

    Plugin Support Alex

    (@alexcozmoslabs)

    I set this ticket as Resolved.
    You can also change its status back to unresolved and let us know by replying to this topic if your issue still needs attention.
    Another option is to let this ticket as it is and open a new one where to mention the issue again and ask for support.

    Thread Starter marcguenther

    (@marcguenther)

    Huh? I wrote a reply with follow up questions two weeks ago. Why are you closing this now as resolved?

    Plugin Support Alex

    (@alexcozmoslabs)

    We try to manage the tickets as efficiently as possible, but sometimes we need to take their pulse and see if the reported problems are still active to know if assistance is still needed.
    My colleague, Andrei, will reply to this topic.

    Hey there,

    Apologies for the misunderstanding.

    The only method that I could come up with for your situation would be wrapping the encoded emails with a “data-no-translation” tag.

    <p data-no-translation>
    This is a paragraph of text that will be excluded from translations.
    </p>

    For further info you can check this article.

    Let me know if this works for you.

    Thread Starter marcguenther

    (@marcguenther)

    I found this CSS selector, which matches only links with email addresses:

    a[href^='mailto:']

    I tried to enter this into “Exclude selectors from translation”, but that didn’t change anything.

    Then for testing, I tried to enter just “a” as a selector. I would think this excludes contents of all links from being translated, but still all links are translated on my site.

    So how is this feature meant to work? If this would work, I would not need to annotate all the email addresses on my site manually…

    Andrei

    (@andrei202)

    Hey there,

    Apologies for not getting back to you any sooner!

    If you excluded this certain elements then they are no longer being translated. But if they have already existing translations they will be displayed if you switch the language.

    In order for this to work properly you should remove the already existing translations.

Viewing 8 replies - 1 through 8 (of 8 total)
  • The topic ‘Destroys email addresses when used with “Email Address Encoder” plugin’ is closed to new replies.