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.

Tagged: 

This topic contains 1 reply, has 2 voices.

Last updated by Mihai Apetrei 1 year, 2 months ago.

Assisted by: Mihai Apetrei.

Author Posts
August 31, 2023 at 8:09 am #14318017

nielsO-5

Is there any way to translate Javascript? For example, when you go to the calculator at the prices page. Then it does translate first. But when you enter something at "Number of monthly website visitors" then the text changes and that text is not translated.

hidden link

Scherm­afbeelding 2023-08-31 om 10.07.58.png
August 31, 2023 at 10:31 am #14319409

Mihai Apetrei
Supporter

Languages: English (English )

Timezone: Europe/Bucharest (GMT+02:00)

Hi there.

Please make sure you are following our guides and also that you are following WordPress's instructions on how to localize scripts.

https://developer.wordpress.org/reference/functions/wp_localize_script/

https://wpml.org/documentation/support/enabling-text-translation-for-themes-not-compatible-with-wpml/

Also, please note that we currently are not able to provide support for custom work within this forum which will be required for translating something from inside Javascript. I however, tried to point you in the correct direction.

If my directions are not enough I suggest contacting one of our 3rd party contractors that specialise in custom work with WPML (https://wpml.org/contractors/) or a developer of your choice.

I hope that you will find this answer insightful.

Mihai Apetrei