Skip to content Skip to sidebar

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

Problem:
The client followed the documentation to make user meta fields translatable and added the user type 'Vendor'. However, they encountered issues with finding the domain as shown in the documentation, and also faced problems with partial translations and automation of the translation process.
Solution:
We advised the client to configure the 'Vendor Plus' role to be translatable via WPML → String Translation. To ensure that the translated values display correctly on the front end, we recommended adding the following code snippet:

add_filter( 'wpml_translate_get_user_meta', '__return_true' );

This filter enables WPML to return the translated value when user meta is retrieved. For automatic translations, although the 'Translate Everything' option does not include String Translation content, strings can still be translated automatically using WPML's automatic translation engine. However, they need to be sent for translation from the Translation Dashboard. For further details, please refer to our documentation: https://wpml.org/documentation/getting-started-guide/string-translation/

If this solution does not resolve your issue, or if it seems outdated or irrelevant 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. Should you need further assistance, please open a new support ticket at WPML support forum.

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

Last updated by dennisB-32 1 month, 1 week ago.

Assisted by: Dražen.

Author Posts
June 9, 2026 at 6:01 am #18088757

dennisB-32

"3. These are user meta fields. To make those translatable, you'll need to follow our documentation:"

I followed the documentation, and the user type 'Vendor' is already added. However, I cannot find the domain for this, as shown in documentation. Can you help see what I'm doing wrong?

Sorry for all the tasks. Hoping you can get me to the finish line.

June 9, 2026 at 6:33 am #18088822

Dražen
Supporter

Languages: English (English )

Timezone: Europe/Zagreb (GMT+02:00)

Hello,

Thanks.

You also need to add custom code to make that field translatable. In this case, the field is `about_company`.

- https://wpml.org/documentation/getting-started-guide/string-translation/translating-user-meta-information-with-wpml/

I added the code via the Theme Editor and did not receive any warnings during the process. However, after saving the changes, I was no longer able to access the WordPress admin area. This suggests there may be another custom code snippet already on the site that is conflicting with the code I added.

Could you please provide FTP access details so I can investigate further?

Alternatively, you can try removing the code snippet I added to functions.php. Once access is restored, add only the custom code required for the `about_company` user field, and it should work correctly.

Regards,
Dražen

June 9, 2026 at 1:02 pm #18090291

dennisB-32

Hi Dražen,

Thanks. It seems that the white-screen was a typo in the code added via the Theme Editor: the about_company string was missing its closing quote ('about_company; instead of 'about_company';), which is a fatal PHP parse error that takes the whole site down.

I've corrected it and the site is back up. Could you help me check next steps?

How do I share SFTP access securely to you?

June 9, 2026 at 2:20 pm #18090939

Dražen
Supporter

Languages: English (English )

Timezone: Europe/Zagreb (GMT+02:00)

Hello,

Great, thank you!

I have now gone to WPML → String Translation and configured the Vendor Plus role to be translatable. If you check now, you should see that the `about_company` field can be translated.

The original value was in English, so I switched it to Spanish, added the translation, and translated it to English.

The only remaining step is to add the code snippet mentioned in our documentation:

To enable WPML to return the translated value when user meta is retrieved via get_user_meta() or get_userdata() — including by plugins and page builders — add the following filter:

add_filter( 'wpml_translate_get_user_meta', '__return_true' );

Once this code is added, the translated values should be displayed correctly on the front end.

Let me know how it goes.

Best regards,
Dražen

June 9, 2026 at 5:51 pm #18091460

dennisB-32

I added this code, and it worked. BUT, only 10% of the 'about' text is showing on english page. It looks like it only translated until first line break. How to fix that?

June 10, 2026 at 6:17 am #18091947

Dražen
Supporter

Languages: English (English )

Timezone: Europe/Zagreb (GMT+02:00)

Hello,

I checked, and that is the translation you added, as shown in the attached screenshot.

If you add the remaining translations, everything should work correctly. I only added the Spanish (ES) translation for testing purposes, and it is working fine on my end.

Best regards,
Dražen

String-Translation-‹-Spaace-Mexico-—-WordPress-06-10-2026_08_16_AM.jpg
June 10, 2026 at 2:26 pm #18093739

dennisB-32

But I doesn't allow automatic translations, which is needed.

This is an 'about' text for all users. So hopefully there will be a lot of them.

June 10, 2026 at 2:35 pm #18093784

Dražen
Supporter

Languages: English (English )

Timezone: Europe/Zagreb (GMT+02:00)

Hello,

It does support automatic translation.

Although this field is not translated through the Translation Editor, it is registered as a string and can be translated automatically through WPML's String Translation workflow.

Once the string is registered, you can go to WPML → Translation Dashboard → Other texts (strings), select the strings you wish to translate, and send them for automatic translation just like any other translatable content.

Please see the attached screenshot for an example of where these strings can be found in the Translation Dashboard.

For more details, please refer to our documentation:
https://wpml.org/documentation/getting-started-guide/string-translation/

If you have a large number of users, this approach should still scale well, as the strings can be translated in bulk through the Translation Dashboard rather than manually one by one.

Please let me know if anything is unclear.

Regards,
Dražen

Translation-Dashboard-‹-Spaace-Mexico-—-WordPress-06-10-2026_04_32_PM.jpg
June 10, 2026 at 3:24 pm #18093969

dennisB-32

Great, I tested and it works.
However, it still looks like this is not fully automated translation. Am I right?

I need it to translate without anyone having to go to the Translation Dashboard. Just as most other content automatically uses the 'Translate everything' option.

June 11, 2026 at 5:27 am #18095134

Dražen
Supporter

Languages: English (English )

Timezone: Europe/Zagreb (GMT+02:00)

Hello,

Yes, that is correct.

At the moment, String Translation content is not included in the "Translate Everything" workflow. While strings can be translated automatically using WPML's automatic translation engine, they still need to be sent for translation from the Translation Dashboard.

I understand this may not be ideal for your workflow, especially if new user-generated content is being created regularly. Unfortunately, there is currently no way to have String Translation items automatically translated without first sending them through the Translation Dashboard.

Regards,
Dražen

June 14, 2026 at 2:45 am #18101750

dennisB-32

Thank you, Dražen. Hoping this will be possible soon!
Will try change my setup to use different input fields for the 'about user' text.