This is the technical support forum for WPML - the multilingual WordPress plugin.

Everyone can read, but only WPML clients can post here. WPML team is replying on the forum 6 days per week, 22 hours per day.

This topic contains 15 replies, has 3 voices.

Last updated by rotemY-2 1 month, 4 weeks ago.

Assigned support staff: Diego Pereira.

Author Posts
August 15, 2019 at 11:47 am #4400501

rotemY-2

I am trying to translate the user's name so that in each language it will be different.
Under translate strings, I added the users and translated them. When in the English version of the dashboard, the user's language is Hebrew. I tried to have the original name in Hebrew and translate to English and vice versa - but I only see the public name of the user and not the translation.
In the string translation screen (that has no flag in the top) the flag next to the string name is for English.
The main (or at least the first language) is Hebrew.

August 15, 2019 at 3:14 pm #4401883

Jamal
Supporter

Languages: English (English ) French (Français )

Timezone: Africa/Casablanca (GMT+01:00)

Hello,

Thank you for contacting WPML Support. I will be glad to help with this.

Regarding the username translation, please test temporarily with a default theme (Twentyseventeen) to check if showing the original username is translated or no. Try this only for the usernames that are registered as English, because I can see some strings in your screenshot in Hebrew but registered as English.

For the string in English and registered in English, If the translation is not showing in the Hebrew page, even with a default theme, please reproduce the issue in one of our servers that you can reach with the link below, and I will approach our compatibility team for help.
hidden link

For the strings that are in Hebrew but registered in English, select them and change their source language using the buttons in the bottom of the String Translation table. If those too, are not showing the Hebrew translation in the Hebrew website, please as mentioned above, try with a default theme, and follow my first suggestions.

Regarding the "Next" button, I am sorry, I did not understand well your question, would you add a screenshot or elaborate more on this.

Looking forward to your reply.

Best regards,
Jamal
WPML Support

August 16, 2019 at 4:34 am #4404663

rotemY-2

Hi Jamel
Thanks for the help. When I used Twentyseventeen as my theme I saw the correct language per setting (Hebrew for Hebrew and so on).
What can be the issue here?

August 16, 2019 at 9:47 am #4405753

Jamal
Supporter

Languages: English (English ) French (Français )

Timezone: Africa/Casablanca (GMT+01:00)

Hello,

This would mean that the theme presents a compatibility bug with WPML. Our compatibility team can help resolve this, we just need to reproduce it in one of our clean servers.

If you are ok to reproduce it, please log in to our server using the link below, configure WPML similarly to your website, upload your theme and reproduce the issue. Then I'll approach the compatibility team and hopefully, we will suggest a fix as soon as possible.
hidden link

If you may also ask the plugin author to join our Go Global Program or provide us with his contact, we will make contact in order to make the plugin fully compatible with WPML.
https://wpml.org/documentation/theme-compatibility/go-global-program/

Best regards,
Jamal

August 16, 2019 at 5:43 pm #4407735

rotemY-2

ok, will do

August 16, 2019 at 6:13 pm #4407839

rotemY-2

I wasn't able to translate the blog posts or the name of the author

August 19, 2019 at 1:54 pm #4416655

Diego Pereira
Supporter

Languages: English (English ) Spanish (Español ) Portuguese (Brazil) (Português )

Timezone: America/Sao_Paulo (GMT-03:00)

Hi there,

Since Jamal currently has a few days off, I will replace him here in the forum. I hope this is OK for you.

Could you please send the link of the page with the string you need to translate (on the test site) and more details about the issue (maybe some screenshots)? We will take a look.

Kind regards,
Diego

August 19, 2019 at 6:44 pm #4418451

rotemY-2

This is a blog page I am trying to transalte the author name
hidden link
Though it doesn't show the author name
Attached are the images: the authors name aren't in the translation section for strings. And I can't add or edit translations

August 20, 2019 at 3:18 pm #4424885

Diego Pereira
Supporter

Languages: English (English ) Spanish (Español ) Portuguese (Brazil) (Português )

Timezone: America/Sao_Paulo (GMT-03:00)

Hi there,

So the issue is that the post is not displayed the author name, correct?

I checked the post and the author name is "demo". I did a search on WPML > String Translator and translated the author name to "demo (author name hebrew)".

After that, I added the following line to display the author name on the single.php file of your theme:

<?php the_author(); ?>

After that, the translated author name is being displayed at the post (check the end of the post):
- hidden link
- hidden link

Could you please let me know if the same solution works on your website? The issue seems related to the theme.

Kind regards,
Diego

August 20, 2019 at 3:30 pm #4425059

rotemY-2

Thanks for this. I tried it and it works, but now it displays both languages.
BTW, on the site, I have it on the top of the site

August 20, 2019 at 11:42 pm #4426805

Diego Pereira
Supporter

Languages: English (English ) Spanish (Español ) Portuguese (Brazil) (Português )

Timezone: America/Sao_Paulo (GMT-03:00)

Hi there,

Perhaps the tag is duplicated on the source code. Could you share the snippet with me so I can take a look?

Kind regards,
Diego

August 21, 2019 at 2:09 am #4427129

rotemY-2

sure

<?php get_header(); ?>

<div id="primary" class="content-area">
    <main id="main" class="site-main" role="main">
        <?php if (have_posts()) : ?>

            <?php while (have_posts()) : the_post(); ?>
                <div class="blog-page-single">
                    <?php if (has_post_thumbnail()) : ?>
                        <div class="blog-page-single-img"><img class="blog-img"
                                                               src="<?php echo get_the_post_thumbnail_url(get_the_ID(), 'blog-full'); ?>"
                                                               alt=""></div>
                    <?php endif; ?>

                    <div class="blog-page-single-h"><?php the_title(); ?></div>
                    <div class="blog-page-single-date">
                        <?php $author_id = $post->post_author; ?>
                        <?php echo get_the_author_meta('user_firstname', $author_id) . ' ' . get_the_author_meta('user_lastname', $author_id); ?>
						
                        <span>●</span> <?php echo get_the_date('Y, j F'); ?>
                    </div>
                    <div class="blog-page-single-desc"><?php the_content(); ?></div>

                </div>
            <?php endwhile; ?>

            <?php
            the_post_navigation(
                array(
                    'next_text' => '<span class="post-title">הבא</span>',
                    'prev_text' => '<span class="post-title">הקודם</span>',
                )
            );
            ?>

        <?php endif; ?>
    </main>
</div>

<?php get_footer(); ?>
August 21, 2019 at 3:24 pm #4432979

Diego Pereira
Supporter

Languages: English (English ) Spanish (Español ) Portuguese (Brazil) (Português )

Timezone: America/Sao_Paulo (GMT-03:00)

Hi there,

On the snippet below:

<div class="blog-page-single-date">
                        <?php $author_id = $post->post_author; ?>
                        <?php echo get_the_author_meta('user_firstname', $author_id) . ' ' . get_the_author_meta('user_lastname', $author_id); ?>

You should remove the get_the_author_meta functions. So it should look like this:

<div class="blog-page-single-date">
                        <?php $author_id = $post->post_author; ?>

Please let me know if it works for you.

Kind regards,
Diego

August 22, 2019 at 7:36 pm #4442525

rotemY-2

So now it isn't duplicated but still not translated

August 23, 2019 at 12:27 pm #4447085

Diego Pereira
Supporter

Languages: English (English ) Spanish (Español ) Portuguese (Brazil) (Português )

Timezone: America/Sao_Paulo (GMT-03:00)

Hi there,

Sorry, this is the correct code:

<div class="blog-page-single-date">
                       <?php the_author(); ?>

Please let me know if it works for you.

Kind regards,
Diego