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

Last updated by Riffaz 4 months, 3 weeks ago.

Assigned support staff: Riffaz.

Author Posts
June 1, 2019 at 10:19 pm #3935951

bilalS-4

how we add strings for custom text which theme not provide us strings for translate.

Link to a page where the issue can be seen:

hidden link

I expected to see the translations in Arabic.

Instead, I got English text again.

June 2, 2019 at 8:24 am #3936987

Riffaz
Supporter

Languages: English (English )

Timezone: Asia/Colombo (GMT+05:30)

Hi,

Thank you for contctaing WPML support.

It depends on how did you create the text.

Did you create it in a theme options like putting the offer text somewhere in the settings?
If yes, it is a theme option. Please refer: https://wpml.org/documentation/getting-started-guide/translating-theme-options/

Did you create it using PHP files? If yes, you have to use get text to make it available for translation.
Please refer : https://wpml.org/documentation/support/enabling-text-translation-for-themes-not-compatible-with-wpml/

Let me know how it goes.

Regards,
Riffaz.

June 2, 2019 at 8:48 pm #3938313

bilalS-4

For example how can i add the translation for this? please check the image.

June 3, 2019 at 6:01 am #3939491

Riffaz
Supporter

Languages: English (English )

Timezone: Asia/Colombo (GMT+05:30)

Hi,

Please refer the solutions provided in this tickets where you can find the working code for making PHP variables translatable: https://wpml.org/forums/topic/translate-function-php-strings/

This is how you have to make PHP translatable: https://wpml.org/faq/getting-string-translation-to-work/

If you are still unable to make it work, let me know the php line in texts. not in screenshot.
So we can test and let you know.

Regards,
Riffaz.

The topic ‘[Closed] Add translation strings for Custom Text’ is closed to new replies.