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.

Sun Mon Tue Wed Thu Fri Sat
9:00 – 18:00 9:00 – 18:00 9:00 – 18:00 9:00 – 18:00 9:00 – 18:00 - -
- - - - - - -

Supporter timezone: Africa/Cairo (GMT+02:00)

This topic contains 4 replies, has 0 voices.

Last updated by jing-yingM 1 hour, 15 minutes ago.

Assisted by: Osama Mersal.

Author Posts
February 1, 2025 at 9:25 pm #16659248

jing-yingM

Background of the issue:
I found the strings in the PHP code in the "WPCode Lite" plugin, but the strings translation can't show in the front end. I am trying to translate the PHP code in the "WPCode Lite" Plugin for my site hidden link.

Symptoms:
The translated strings in the PHP code do not appear on the front end.

Questions:
How can I make the translated strings appear on the front end?

February 2, 2025 at 12:25 pm #16659887

Osama Mersal
Supporter

Languages: English (English ) Arabic (العربية )

Timezone: Africa/Cairo (GMT+02:00)

Hi,

Thanks for contacting WPML forums support. I'll be glad to help you today.

You need to wrap the test in the GetText function. After that, you can translate the string using the string translation. Kindly check this guide to know more about translating hard-coded strings.

Best regards,
Osama

February 6, 2025 at 8:02 pm #16677047

jing-yingM

Hello

How to wrap the test in the GetText function?
I can't find the guide for wrapping the test in the GetText function.

Thank you

February 7, 2025 at 11:38 am #16679401

Osama Mersal
Supporter

Languages: English (English ) Arabic (العربية )

Timezone: Africa/Cairo (GMT+02:00)

Hi,

Here is the hidden link">guide. Please check step number 2 (Wrap All Texts in GetText Calls).

Best regards,
Osama

February 8, 2025 at 6:57 pm #16683051

jing-yingM

Hi

I can't understand the step number 2 , Could you provide the code wrapped and I can update the code in code snippets . I checked with the resolution from here(https://wpml.org/forums/topic/translate-the-strings-in-custom-code-snippet-in-codesnippets-plugin) ,But I can't understand the code.

Thank you