Skip to content Skip to sidebar

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

Problem:
The client needed to translate the term 'RELATED SESSIONS' which was manually changed from 'related products' in a PHP file on their server, and was not appearing in WPML's string translation.
Solution:
We advised the client to ensure that the string 'Your Custom Title' is wrapped with a WordPress translation function to make it translatable by WPML. Here's a step-by-step guide:
1. Modify the PHP code in functions.php to include a translation function:

return __( 'Your Custom Title', 'your-text-domain' );

2. Replace 'your-text-domain' with the theme’s text domain.
3. Navigate to WPML → Theme and plugins localization and scan the theme so WPML can detect the new string.
4. Go to WPML → String Translation, search for 'Your Custom Title', add the Arabic translation, and save.

If this solution does not resolve your issue or seems outdated, we recommend opening a new support ticket. We also advise 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. For further assistance, please visit our support forum 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 10 replies, has 0 voices.

Last updated by Dražen 3 days, 22 hours ago.

Assisted by: Dražen.

Author Posts
April 10, 2026 at 3:18 pm #17962556

emirates-literatureF

Related Sessions not translated to arabic here: hidden link because it was changed manually from CPANEL from server side and its not appearing in WPML string translation and in text admin area. where can i find it please urgently?

April 14, 2026 at 6:15 am #17967475

Dražen
Supporter

Languages: English (English )

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

Hello,

I checked the page and I can see the “Related Sessions” section displaying on both Arabic and English versions.

Could you please clarify what exactly is not translated or not showing as expected? If possible, a screenshot or a specific example would help.

Also, regarding your note about changes made manually via cPanel/server side, could you explain what was modified and how? This is important, as such changes can bypass WPML and therefore not appear in String Translation or admin texts.

Kind regards,
Dražen

April 15, 2026 at 5:50 am #17970258

emirates-literatureF

the word here: hidden link is in english when you are seeing this link URL:hidden link i want to translate these 2 words: RELATED SESSIONS

April 15, 2026 at 6:34 am #17970308

Dražen
Supporter

Languages: English (English )

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

Hello,

Thank you for your message.

Could you please confirm if those words (“RELATED SESSIONS”) are added manually somewhere (for example inside the page, builder, theme options or template)?

If not, then they are most likely coming from your theme or a plugin. In that case, you can translate them by doing the following:

- Go to WPML → String Translation
- Search for “RELATED SESSIONS”
- Add the translation for Arabic and save

If you are not able to find the string, you may first need to scan your theme/plugins:

- Go to WPML → Theme and plugins localization
- Scan the active theme and related plugins
- Then check again in String Translation

Let me know if you’re able to locate it.

Regards,
Dražen

April 15, 2026 at 9:32 am #17970706

emirates-literatureF

I did all above steps already, but couldn't find the sentence. This is basically from the theme, and instead of related products, I changed it manually from server to related sessions, its alike a PHP file inside my server, so it's from the theme, but WPML cant translate that?

April 15, 2026 at 9:56 am #17970782

emirates-literatureF

JUST to give context, im using the below script:

// Rename Related Products title in WooCommerce
add_filter( 'woocommerce_product_related_products_heading', 'custom_related_products_heading' );
function custom_related_products_heading( $heading ) {
return 'Your Custom Title'; // Change 'Your Custom Title' to what you want
}

In the functions.php file on the server here: hidden link, so I need to translate that to Arabic in WPML. Is that possible?

April 15, 2026 at 10:09 am #17970805

Dražen
Supporter

Languages: English (English )

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

Hello,

Thank you for the clarification this helps a lot.

In your case, the text “Your Custom Title” is hardcoded in PHP via functions.php. Because of that, WPML will not automatically detect it for translation unless it is registered properly.

To make this translatable in WPML, you need to wrap the string with a WordPress translation function.

Please check: https://wpml.org/documentation/support/how-to-use-gettext/

So in theory your code should like something like this

.... return __( 'Your Custom Title', 'your-text-domain' );

Replace 'your-text-domain' with your theme’s text domain for example.

After that:
- Go to WPML → Theme and plugins localization
- Scan your theme (so WPML detects the new string)
- Go to WPML → String Translation
- Search for “Your Custom Title”
- Add the Arabic translation and save

It should work fine then.

Regards,
Drazen

April 15, 2026 at 10:19 am #17970817

emirates-literatureF

I still cant find the English words in WPML here: hidden link There is still words in English that should be in arabic and I can't translate them unfortunately.

April 15, 2026 at 10:29 am #17970833

emirates-literatureF

YES AMAZING! all good for the related sessions! Finally, it's showing now: hidden link after enabling string translation settings for JS and PHP files as well in WPML settings.

April 15, 2026 at 10:32 am #17970849
emirates-literatureF

SORRY SORY MY BAD! Forgot to mention that this is the arabic shop page: hidden link and it's the translation of the English shop page: hidden link but I had to change the page title as per the project needs, and I want to translate all of that to arabic.

New threads created by Dražen and linked to this one are listed below:

https://wpml.org/forums/topic/split-related-sessions-not-translated-to-arabic/

April 15, 2026 at 10:36 am #17970876

Dražen
Supporter

Languages: English (English )

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

Hello,

thanks for getting back, glad to hear it works fine now.

We limit 1 issue per ticket to keep things clear. This will help other users with similar problems to find solutions when searching the forum.

I have opened a new ticket for you:

- https://wpml.org/forums/topic/split-related-sessions-not-translated-to-arabic/

I will be closing this ticket now since seems no more doubts about the topic and lets continue there.

Regards,

Drazen