Skip Navigation

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.

Sun Mon Tue Wed Thu Fri Sat
8:00 – 12:00 8:00 – 12:00 8:00 – 12:00 8:00 – 12:00 8:00 – 12:00 - -
13:00 – 14:00 13:00 – 17:00 13:00 – 17:00 13:00 – 17:00 13:00 – 17:00 - -

Supporter timezone: Europe/Lisbon (GMT+00:00)

This topic contains 15 replies, has 2 voices.

Last updated by Johan 1 year, 11 months ago.

Assisted by: Johan.

Author Posts
December 1, 2022 at 8:51 am #12568419

Emaar

Tell us what you are trying to do?
The issue is regarding string translations. Apparently in one domain, the strings are having the translations for different language but cannot see these translated strings on the frontend.

Is there any documentation that you are following?

Is there a similar example that we can see?

What is the link to your site?
hidden link

December 2, 2022 at 10:04 am #12577499

Emaar

Can anyone please take a look at the issue that I have posed yesterday?

December 4, 2022 at 2:22 pm #12586351

Johan

Hi,

1- Can you share which page and which string are not being translated? and share the name of the domain too.

2- Please give me a few more details about the strings (text) that are not translated & not appear in the tool. Are you using a widget for this block, a page builder, template plugins, or a shortcode?

3- have you tried instead of searching for a domain to translate just searching for the strings that are missing the translation?

If this doesn't fix the issue, go to WPML → String Translation, then follow these steps to make the strings available for translation:
→ Go to WPML → String Translation;

→ Scroll down the page and enable the Look for strings while pages are rendered option;

→ Go to the page where the strings you want to translate are visible and refresh the page;

→ go back to WPML → String Translation;

→ disable the Look for strings while pages are rendered option;

→ look again for the strings in WPML

→ String Translation area and translate them.

Please it is important that you do the following steps meticulously ☺️

December 6, 2022 at 12:48 pm #12599095

Emaar

Hi Johan,

1. Yes the strings which are not displaying is from one particular domain, wpml_book. We have around 80 strings in the domain, we also have translations for 5 different languages. But the translated words for all the languages are not displaying on the front page.

2. We use <?php _e('string', 'wpml_book') ?>, to display the string on the template.

3. One temporary fix which I found was to create a new domain and export the wpml_book domain strings PO files and import these in the new domain (wpml_book_new). It worked. But for a short time.

This issue is only for String translations. Rest pages, posts or other custom posts does not represent this issues.

December 6, 2022 at 4:10 pm #12600475

Johan

Thanks, can i ask why you are using the <?php _e('string', 'wpml_book') ?> to display the translation?

I will also need your credentials to have a look at your configuration

I'll need to take a closer look at your configuration, so for that, I'll need to request temporary access (WP-Admin and FTP) 💻

Your next answer will be private, which means only you and I have access. Also after a few weeks access is removed from this thread.

❌ Please backup your database and website ❌
You can use this plugin to do this: https://wordpress.org/plugins/duplicator/
It's done in just a few minutes. If Duplicator is not working please use another one, this was just a suggestion.

☑️ Permissions:
✙ I would need your permission to disable and re-enable plugins and theme and to change configurations on the site if needed. This is also a reason why the backup is critical.

✙ I would also need your permission to take a local copy of your site to debug the problem without affecting your live site. So you can drop the two files you will see with the duplicator plugin, in the field provided.

Johan

December 7, 2022 at 6:36 am #12604091

Emaar

Hi Johan,

We are using the same to display different language strings for different ICL code we get in the url, in this way we can have different translated strings for different language.
If there is another way, do let me know.

Also with the wp-admin and FTP access, there is a bit of a security concern in the company policy.
Either we can give you RDP access for the system where you will have full access to the site or you have to give us your static IP, for which we can allow the same in our system and give you wp-admin access.

Please let me know in what ways we can work this out.

December 7, 2022 at 1:11 pm #12607035

Johan

I've asked for advice from a colleague, as I'm not familiar with your subject. Getting back to you shortly.

December 7, 2022 at 1:44 pm #12607381

Johan

So I will not need your access now. However, checking your code we have noticed that there is a mistake.

You can check this documentation: https://wpml.org/documentation/support/enabling-text-translation-for-themes-not-compatible-with-wpml/

You are using underscore for text-domain which is not correct as per:
"The text domain name must use dashes and not underscores and be lowercase".

I would suggest that you remove the strings from WPML ST, change the text domain to use dashes and then rescan the theme and translate.

Let us know how it goes,

December 8, 2022 at 5:51 am #12611833

Emaar

Thanks.
Let me try this and get back to you.

December 12, 2022 at 7:50 am #12632093

Emaar

Hi Johan,

I tried to solution you shared, I changed the domain from (_) to (-), and it worked for 1-2 days and then it reverted back the same previous state. Which is have the translations in the wp-admin sting translations but are not reflected to front-end.

current code: <?php _e('Stay signed in', 'wpml-login-strings'); ?>
Link1: hidden link
Link2: hidden link
Link3: hidden link

In the above link you can change different languages, you can only see English strings there not the translated ones which we already have in the wpml string translations.

The strings you can see in the page which are in English, all belongs to wpml-login-strings domain.

December 12, 2022 at 5:01 pm #12636987

Johan

Ok could you please try to on a minimal environment, I've made a sandbox so we can perform it there and see if it's working on an empty website.

Please follow the link here and reproduce the same steps as you did using our method, you have to install the theme but don't install any other plugins.

Here is the link : hidden link

Note that the sandbox will expire in a few days.
Thanks

December 14, 2022 at 7:16 am #12647121

Emaar

Hi Johan,

I am afraid, I wont be able to upload the website theme on the sandbox side. Although I have asked the security team to look into it and will get back to you with an update.

Meanwhile, can you please let me know the probable cause for this issue to arise ?
Cause we have the translated strings in the backend but only for one domain the strings are not printing on the frontend. Rest other domains are working fine. There's the problem only with the one.

Also, is there any way I can see any error logs or enable error reporting for wpml ?
Incase I get to see any errors and know what is happening in the background.

December 14, 2022 at 10:43 am #12648515

Johan

Hi,

Thanks for the feedback there are no error logs that we can detect like that on our side. We don't have a proper explanation. I asked a colleague and he said in your case in order to have a proper answer on what is going on, we need to isolate the issue with the minimum requirements but with the same condition as your website (theme and code) in order to see if it is related to a debug (general issue) or it is related to custom code.

Unfortunately, the sandbox is the only way for me to then forward it to the right team. I'm waiting for you to get back to me with the sandbox result 🙂 Please note that the sandbox expires in a few days.

Thanks for your cooperation!

December 15, 2022 at 5:24 am #12654783

Emaar

Thank you for the assistance.

I am trying to get the security clearance from security team.

Also, I am trying to debug the issue, searched db logs and wpml mo files. Sharing you the screenshot below for the same.

Can you please try to check what can be the issue in here ?

I followed this link to get to this step.
https://wpml.org/errata/string-translations-are-not-displayed-when-a-language-locale-is-changed/

wpml-login-strings-wpadmin.png
wpml-login-strings-files.png
wpml-login-strings-db.png
December 15, 2022 at 10:56 am #12656621

Johan

Are the issues from the screenshot you have shared from the sandbox i provided? I don't see any tests yet made on the sandbox : hidden link

The topic ‘[Closed] Cannot see translated strings for a perticular domain’ is closed to new replies.