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.

This topic contains 2 replies, has 2 voices.

Last updated by allisonT-3 3 years ago.

Assisted by: Mateus Getulio.

Author Posts
June 10, 2022 at 2:07 pm #11434955

allisonT-3

So, I am trying to scan a custom theme for strings to be translated. What I get is a pop-up saying 'scanning results' that never completes.

I went to the support page and found some strange things. 1. WPML is telling me REST API is disabled. REST API is definitely up and running, I'm making calls to it in my custom theme

June 10, 2022 at 8:32 pm #11436823

Mateus Getulio
Supporter

Languages: English (English ) Portuguese (Brazil) (Português )

Timezone: America/Sao_Paulo (GMT-03:00)

Hello again,

In order for us to take a closer look at this issue, I'd like your help creating a package of your website and sending it to us.

Please use the plugin Duplicator(hidden link) to create a full copy of your website so we can take a look at it and see what's causing the issue with the large table.

Please check our tutorial on how to create a Duplicator package here: https://wpml.org/faq/provide-supporters-copy-site/

If you come across problems while creating it, please feel free to ignore(exclude from the backup) both uploads and cache folders.

I'm enabling the proper field for your to share this copy, you'll see it on your next response.

Alternatively, you may use any file sharing service that you prefer and share the link in the ticket(your next response is being marked as private, only you and I have access to it).

Thank you, please let me know.

June 13, 2022 at 11:05 pm #11452913

allisonT-3

I resolved the issue. For whomever it may help, if you're trying to translate strings in a react component made through @wordpress/scripts, use wp_localize_script immediately after wp_enqueue_script. In your theme folder, run 'npm install @wordpress/i18n --save-dev'. and use 'import { __ } from '@wordpress/i18n'. Example case: "<p>{__(localized_script_data.message, 'your-text-domain')</p>"