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 1 reply, has 2 voices.

Last updated by Osama Mersal 1 year, 10 months ago.

Assisted by: Osama Mersal.

Author Posts
March 6, 2023 at 7:41 am #13175789

innovexA

Tell us what you are trying to do?
Translate custom function

Is there any documentation that you are following?

Is there a similar example that we can see?

What is the link to your site?

March 6, 2023 at 8:21 am #13175993

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.

1) In order to translate hard-codded strings, you need to use the GetText function. Please check this guide to know more about translating hard-codded strings. (https://wpml.org/documentation/support/translating-the-theme-you-created/)

Please note that supporting custom code is out of our forum scope. Kindly check our support policy. (https://wpml.org/purchase/support-policy/)

2) It's unrelated to the issue, but according to your Debug.info, the WP memory limit needs to be increased. PHP memory is fine, but WordPress uses 40Mb as default. The minimum requirements for WPML are 128 MB. (Kindly check this page https://wpml.org/home/minimum-requirements/)

You can increase it by adding the following code in your wp-config.php file right before the /* That's all, stop editing! Happy publishing. */ line:

/* Memory Limit */
define('WP_MEMORY_LIMIT', '256M');
define( 'WP_MAX_MEMORY_LIMIT', '256M');

I hope this helps you. If you need further info, please let me know.

Best regards,
Osama

The topic ‘[Closed] my custom function not showing when translate can you convert func to translate’ is closed to new replies.