Skip to content Skip to sidebar

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

Problem:
You need a function or method to translate specific words as shown in your screencast.
Solution:
To make your custom text translatable, we recommend wrapping all static texts in gettext calls such as

__()

and

_e()

. After doing so, navigate to WPML → Theme and plugins localization and scan your child theme for new strings. This action will register them in WPML’s String Translation, where you can then provide translations.

For detailed guidance on adding gettext calls to your PHP code, please visit:
How to Internationalize and Translate WordPress Themes and Plugins

To learn more about scanning a theme or plugin to update existing translations, check out:
Scanning a Theme or Plugin to Update Existing Translations

If this solution does not apply to your case, or if it seems outdated, 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 do not hesitate to 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.

This topic contains 4 replies, has 1 voice.

Last updated by Andrey 1 month ago.

Assisted by: Andrey.

Author Posts
March 9, 2026 at 8:42 pm #17883295

alrowadit

i need a function or any thinge else to translate specific words like it in the screencast

March 9, 2026 at 8:58 pm #17883321

alrowadit

i need to translate specific strings in my site but don't apper in String Translation i need a function or any thing else to translate theme without any errors in my site

Screenshot 2026-03-09 224029.png
March 10, 2026 at 11:10 pm #17887231

Andrey
WPML Supporter since 06/2013

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

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

Thank you for contacting WPML support.

To make your custom text translatable, you need to wrap all static texts in gettext calls (e.g., __(), _e(), etc.). After that, go to WPML → Theme and plugins localization and scan your child theme for new strings. This will register them in WPML’s String Translation, where you can provide translations.

hidden link

Adding GetText Calls to PHP Code

In PHP, wrap all the hard-coded strings in gettext WordPress localization functions like __() and _e(). Specify a text domain to uniquely identify translations for your theme or plugin.

The __() function returns the strings

__('Hello, world!', 'your-text-domain');

The _e() function echoes a translatable string

_e('Hello, world!', 'your-text-domain');

These functions find the correct translation in the specified locale and domain. If no translation is available, the original string will remain unchanged.

Scanning a Theme or Plugin to Update Existing Translations:
https://wpml.org/documentation/getting-started-guide/string-translation/finding-strings-that-dont-appear-on-the-string-translation-page/#scan-theme-or-plugin-to-update-translations

March 13, 2026 at 7:54 pm #17896648

alrowadit

Not working I'm doing it like you explain it to me but no word added

March 16, 2026 at 2:15 pm #17900825

Andrey
WPML Supporter since 06/2013

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

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

Thank you for your feedback.

Please provide details, including examples of how you are doing, and show me the results.

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