• Resolved Generosus

    (@generosus)


    Good Day!

    We just noticed … your plugin is translating the names created within WordPress’ User field.

    Unless we missed something, it would be great if you can update your code to skip these fields from translation. Proper names should not be translated.

    Some user name translations are quite funny. For example, “Shoemaker” is being translated into “Zapatero” (Spanish). Hilarious!

    We searched this forum for a solution, but found none. ??

    Thank you!

Viewing 3 replies - 1 through 3 (of 3 total)
  • Thread Starter Generosus

    (@generosus)

    Update:

    We’ve learned that this issue may be theme related, not plugin related. In our case, we’re using Avada. The affected Avada file is:

    /wp-content/themes/avada/templates/author-info.php

    Specifically, Line 45:

    ( Avada()->settings->get( 'disable_date_rich_snippet_pages' ) && Avada()->settings->get( 'disable_rich_snippet_author' ) ) ? '<span class="fn">' . esc_attr( $author_name ) . '</span>' : esc_attr( $author_name )

    We need to find a way to add “notranslate” to <span class="fn"> to obtain: <span class="fn notranslate">

    The above file helps define the metadata contained inside our blog posts.

    Have you dealt with this before? Is there a JS code you can share to accomplish the above?

    Thank you!

    Plugin Author edo888

    (@edo888)

    Hi,

    You should be able to create a child theme and simply add it manually, so future updates do not revert the change. You can consult your theme developer for details.

    If that is not an option you can do it via javascript, something like:

    jQuery('span.fn').addClass('notranslate');

    Thanks! ??

    Thread Starter Generosus

    (@generosus)

    Thank you! Your JS code worked like a charm.

    For those interested in implementing the above solution, add the following code to the footer (Space before </body>) of your website:

    <script> jQuery('span.fn').addClass('notranslate'); </script>

    After implementing the above solution, you may notice there is no space between the translated and non-translated text fields. To correct this, add the following CSS Rule to your website:

    .fn {margin-left: 4px!important;}

    Cheerio! ??

Viewing 3 replies - 1 through 3 (of 3 total)
  • The topic ‘Plugin is Translating WordPress Defined User Names’ is closed to new replies.