• Resolved Generosus

    (@generosus)


    Good Day!

    Hey, I searched but could not find a code snippet that would allow me skip the translation of WP Usernames (publicly displayed names, etc.)

    Details: https://prnt.sc/dgkGvx8MVdda

    Depending on the language selected, your plugin is currently translating our posts’ author names (i.e., usernames). Some of the translations are pretty hilarious.

    Would be great if you can provide one without steering me to buy your Pro plugin. Not for this one request, at least ??

    Also, it would be great if you could update your plugin to ensure it skips the translation of Usernames automatically.

    Thank you.

Viewing 5 replies - 1 through 5 (of 5 total)
  • Plugin Author edo888

    (@edo888)

    Hi,

    Here is the documentation: How to skip translations?

    Thanks! ??

    Thread Starter Generosus

    (@generosus)

    Hi @edo888,

    Thank you. Unfortunately, in this case, none of the methods provided in your documentation work.

    If you can think of another way to do it, please let me know.

    We’re dealing with WordPress’ HTML code, not our own. If we change it programmatically, the “notranslate” entry will disappear next time WordPress is updated.

    A code snippet linked to a WP hook or filter is probably the way to go.

    Cheerio!

    Plugin Author edo888

    (@edo888)

    Hi,

    If you have added notranslate and it does not work let me know.

    There are ways to make it permanent through your theme. You can also do it via javascript.

    Thanks! ??

    Thread Starter Generosus

    (@generosus)

    Hi @edo888,

    Adding “class=notranslate” directly into our theme (i.e., any theme) or WordPress is not the way to go since the change will be wiped out when the theme or WP are updated. Using a child theme is not an option for us.

    If you can provide a code snippet (filter) for your plugin that will allow us to exclude a string or class (e.g., vcard) from translation, that would be awesome (similar to the one provided by TranslatePress).

    Specifics: As you can see in the below screenshot, we have a blog author named “John Shoemaker”. When we apply the Spanish translation using your plugin, his name changes to “Juan Zapatero” (pretty funny). We want to exclude, therefore, all authors that are identified with <span "class=vcard"> or the string “John Shoemaker”.

    Screenshot: https://prnt.sc/iDe0Um6v42-L

    Solving the above will not only help us, but everyone using your amazing plugin ??

    Thank you.

    Plugin Author edo888

    (@edo888)

    Not sure why using the child theme is not an option for you, but you can use our paid version which will give you an option to skip the translations by defining CSS selectors.

    So in your specific case you can use span.vcard as a CSS selector.

    https://gtranslate.io/#pricing

    Thanks! ??

Viewing 5 replies - 1 through 5 (of 5 total)
  • The topic ‘Help Appreciated | Code Snippet to Skip Translation of WP Usernames’ is closed to new replies.