Skip to content Skip to sidebar

This thread is resolved. Here is a description of the problem and solution.

Problem:
The client is unable to translate the words "Country" and "City" on their website, which is caused by custom JavaScript code added via the WPCode plugin.
Solution:
1. Temporarily disable the custom code added via WPCode and verify that translations work correctly.
2. Contact the developer who created the custom script and ask them to make the JavaScript strings translatable using WordPress localization functions. For guidance on how to localize scripts, visit the WordPress documentation: https://developer.wordpress.org/reference/functions/wp_localize_script/
Since custom JavaScript implementation is outside our support scope, the developer of the code will be the best person to adjust it.

If this solution does not resolve your issue or seems outdated, we recommend checking related known issues at https://wpml.org/known-issues/, verifying the version of the permanent fix, and confirming that you have installed the latest versions of themes and plugins. Should you need further assistance, please open a new support ticket at WPML support forum.

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 8 replies, has 0 voices.

Last updated by Dražen 1 month, 2 weeks ago.

Assisted by: Dražen.

Author Posts
March 4, 2026 at 12:08 pm #17871818

SarunasS-4

Hello,

I can’t figure out how to translate these two words on the website: “Country” and “City”: hidden link

March 5, 2026 at 6:38 am #17873600

Dražen
Supporter

Languages: English (English )

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

Hello,

I tried to check the URL you shared so I could better understand which strings are in question and where they might be coming from, in order to suggest how they can be translated. However, I receive a 403 Forbidden message when trying to access the page.

Could you please check and make sure the page is accessible so I can visit it?

Regards,
Drazen

March 5, 2026 at 8:15 am #17873895

SarunasS-4

Hello,

You can now take a look: hidden link

Screenshot from 2026-03-05 10-15-00.png
March 5, 2026 at 8:47 am #17874025

Dražen
Supporter

Languages: English (English )

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

Hello,

Thanks for allowing access.

1) To help us handle your request faster, could you please share the WPML debug information from your site?

- Log in to your site and go to WPML → Support
- Click the “Debug information” link at the bottom of the page
- On the Debug Information page, select all the content in the text box and copy it
- Then return to this support ticket and paste it into the debug information box

You can find more details here:
https://wpml.org/faq/provide-debug-information-faster-support/

2) I’m not sure if these strings are being added through your site settings or a page builder. If not, they are most likely coming from the theme or a plugin used on that page.

Please try the following:

- Go to WPML → Theme and Plugin Localization
- Select your theme and any related plugins (for example a job plugin/addon if you are using one) and run the scan
- After that go to WPML → String Translation, search for the string (for example “City”) and translate it there.

Let me know how it goes.

Regards,
Drazen

March 5, 2026 at 9:07 am #17874055

SarunasS-4

I have already tried the second step, and it didn’t help.

March 5, 2026 at 10:40 am #17874415

Dražen
Supporter

Languages: English (English )

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

Hello,

thanks for getting back.

Please share the access details of your website, so I can log in and take a look.

I’m enabling a private message for the following reply.

We have strict policies regarding privacy and access to your information.

Please see:
https://wpml.org/purchase/support-policy/privacy-and-security-when-providing-debug-information-for-support/


- Please backup the site files and database before providing us access. 

- If you have a staging site where the problem can be reproduced, it is better to share access to the staging site.



Thanks,
Drazen

March 5, 2026 at 1:05 pm #17874987

Dražen
Supporter

Languages: English (English )

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

Hello,

Thank you.

After checking your website, I can confirm that the issue is caused by your custom JavaScript code that is added via the WPCode plugin. When this custom code is disabled, the translation works correctly.

JavaScript strings need to be properly localized in the code in order to become translatable. For example, developers usually need to pass translatable strings from PHP to JavaScript using functions like wp_localize_script or other WordPress localization methods.

I recommend the following:

- Temporarily disable the custom code added via WPCode and verify that translations work correctly.

- Contact the developer who created the custom script and ask them to make the JavaScript strings translatable using WordPress localization functions.

- You can also check the WordPress documentation about localizing scripts here:
https://developer.wordpress.org/reference/functions/wp_localize_script/

Custom JavaScript implementation is outside the scope of WPML support, so the developer of the code will be the best person to adjust it.

If you need anything else from our side, please let me know.

Regards,
Drazen

March 5, 2026 at 3:04 pm #17875459
SarunasS-4

Thank you for the information.

Could you also help translate the filter?

There are quite a few English words, such as “Experience”, “Fresh” and “Year”: hidden link

New threads created by Dražen and linked to this one are listed below:

https://wpml.org/forums/topic/split-help-translate-the-filter/

Screenshot from 2026-03-05 17-00-55.png
March 6, 2026 at 6:00 am #17876510

Dražen
Supporter

Languages: English (English )

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

Hello,

thanks for getting back.

We limit 1 issue per ticket to keep things clear. This will help other users with similar problems to find solutions when searching the forum.

I have opened a new ticket for you and lets continue there:
- https://wpml.org/forums/topic/split-help-translate-the-filter/

I will be closing this ticket now since seems no more doubts about the topic.

Regards,

Drazen