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.

Tagged: 

This topic contains 10 replies, has 2 voices.

Last updated by Andrey 11 months, 1 week ago.

Assisted by: Andrey.

Author Posts
June 26, 2024 at 7:57 pm #15837017

rafaelS-33

Background of the issue:
I try to translate a string (did the translation from English > German in String Translation) but the translation is not showing up.

Symptoms:
The translation is not showing up.

Questions:
Why is the translation not showing up after using WPML String Translation?

June 26, 2024 at 8:52 pm #15837308

Andrey
WPML Supporter since 06/2013

Languages: English (English ) Russian (Русский )

Timezone: Europe/Kyiv (GMT+03:00)

Thank you for contacting WPML support.

Please ensure that you have searched for and translated the correct string.

Here are the steps to follow:
- Go to WPML >> String Translation
- Enable the "Look for strings while pages are rendered" option
- Open the desired page where untranslated strings are displayed
- Return to WPML >> String Translation and check if the new strings have been registered
- Make a translation

https://wpml.org/documentation/getting-started-guide/string-translation/finding-strings-that-dont-appear-on-the-string-translation-page/

June 27, 2024 at 4:48 pm #15845641

rafaelS-33

Hi Andrey

Thanks for your feedback. We did followed these steps and it worked.

BUT - only as long as "Look for strings while pages are rendered" is active (for about 2h). Once this is deactivated, the strings are back to "normal" and translations are not considered anymore.

Any advice how to fix this?

June 28, 2024 at 5:02 pm #15853507

rafaelS-33

Hello, apologies for "pushing", is there any chance to fix this behavior, that certain string translations are only visible on the frontend while "Look for strings while pages are rendered" is active?

Many thanks

July 1, 2024 at 11:57 am #15868252

Andrey
WPML Supporter since 06/2013

Languages: English (English ) Russian (Русский )

Timezone: Europe/Kyiv (GMT+03:00)

Thank you for your feedback.

Could you show me and explain where those strings come from?

I've enabled debug information for this support ticket. Please see this link for how to get this information from your site and give it to us:
http://wpml.org/faq/provide-debug-information-faster-support/

July 2, 2024 at 9:25 pm #15878257

rafaelS-33

Hi there,

If you visit our site (German) and then click in the upper-right corner on the shopping bag, there will be a mini-basket shown (modal window) with a button.

The text on this button is not translatable "Return to shop" (English instead of German) even if it's translated in WPML String translation.

As soon as we turn on the "Look for strings while pages are rendered" we can see the button translated (but it remains only for 2 hours).

Thank you

July 3, 2024 at 1:34 pm #15884920

Andrey
WPML Supporter since 06/2013

Languages: English (English ) Russian (Русский )

Timezone: Europe/Kyiv (GMT+03:00)

Do you know if the string "Return to shop" is part of your current theme or some plugin?

Please check if the option is enabled in Language filtering for AJAX operations option in WPML → Languages.

July 3, 2024 at 7:51 pm #15886742

rafaelS-33

It‘s part of the theme. This fuction was enabled.

Many thanks

July 4, 2024 at 4:27 pm #15893377

Andrey
WPML Supporter since 06/2013

Languages: English (English ) Russian (Русский )

Timezone: Europe/Kyiv (GMT+03:00)

I need to request temporary access (wp-admin and FTP) to your site – preferably to a test site where the problem has been replicated if possible – in order to be of better help. You will find the needed fields for this below the comment area when you log in to leave your next reply. The information you will enter is private which means only you and I can see and have access to it.

July 8, 2024 at 6:38 am #15910283

rafaelS-33

Update
----------------
We just noticed that, if we activate "Automatically load the theme's .mo file using 'load_textdomain'", the correct translation is shown on the frontend.

You can see the behavior if you turn this functionality on > switch to the frontend > click in the upper right part on the basket > check button (now in German).

However, once activated, we can't find i.e. this particular string "Return to shop" (and many others) anymore using the build-in "WPML String Translation".

So in case turning on "Automatically load the theme's .mo file using 'load_textdomain'", how and where can we still translate those strings in .mo-Files from the theme using WPML?

July 8, 2024 at 2:32 pm #15913998

Andrey
WPML Supporter since 06/2013

Languages: English (English ) Russian (Русский )

Timezone: Europe/Kyiv (GMT+03:00)

Thank you for the update. The solution you found looks good.

However, once activated, we can't find i.e. this particular string "Return to shop" (and many others) anymore using the build-in "WPML String Translation".

Could you clarify this? I can find "Return to shop," for example. Sharing the screenshot.

Screen Shot 2024-07-08 at 17.24.39.png
String-Translation-‹-FEAVR®-—-WordPress.png