Skip Navigation

This thread is resolved. Here is a description of the problem and solution.

Problem:
Client was using custom code where some strings were not being detected for translation, despite using proper gettext methods.

Solution:
It turned out there were unnecessary spaces in the strings and in the related ACF fields. Removing those fixed the problem.

If this solution does not resolve your issue or seems irrelevant due to being outdated or not applicable to your case, we highly recommend checking related known issues at https://wpml.org/known-issues/, verifying the version of the permanent fix, and confirming that you have installed the latest versions of themes and plugins. If the problem persists, please open a new support ticket.

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 0 replies, has 0 voices.

Last updated by ghledisC 3 weeks, 3 days ago.

Assisted by: Waqas Bin Hasan.

Author Posts
March 18, 2025 at 12:13 pm #16829750

ghledisC

Background of the issue:
I am trying to have source language strings translated through String Translations and displayed correctly on the front end of my site, hidden link. I enabled the string pickup option from the String translations page and reloaded the page where the strings are.

Symptoms:
The strings are either not picked up or just not displayed. On the translated post, they display in the source language, even though other strings on the same page are displayed correctly.

Questions:
Why are some strings not being picked up or displayed correctly after enabling the string pickup option?
Why do some strings display in the source language on the translated post while others display correctly?

March 18, 2025 at 12:45 pm #16830202

Waqas Bin Hasan
Supporter

Languages: English (English )

Timezone: Asia/Karachi (GMT+05:00)

Hi,

Reference to our recent chat, I need to take a closer look at your site. So I request temporary access (WP-Admin and FTP), preferably to a test site where the problem has been replicated.

Your next answer will be private, to share this information safely.

Also provide detailed steps to reproduce the issue and links to pages in the admin and on the frontend.

IMPORTANT: Please take a complete backup of the site to avoid data loss. I may need to activate/deactivate plugins also.

See https://wpml.org/purchase/support-policy/privacy-and-security-when-providing-debug-information-for-support/ for details on privacy and security.

P.S.: If you don't see the section for providing access information, do not write in the message box or the information may appear as public.

Regards.

March 18, 2025 at 1:49 pm #16830752

ghledisC

Thank you.

I looked at the problem further.

It turns out that there was an unnecessary space in either of the strings when the __( was called.

I had to rename the ACF label and delete a space.

For the other labels I applied a trim in one of the functions and that seemed to have handled it.

Either way, thank you for your time.