Skip Navigation

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

Problem:
Content from custom code not showing as translated in second language
Solution:
1- Install WP forms multilingual
2- Manually link the Two forms (Original and translation) with each other

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

Last updated by akqaF 1 year, 9 months ago.

Assisted by: Ilyes.

Author Posts
June 13, 2023 at 1:26 pm #13817577

akqaF

I have added translation for "Number must be minimum 8 in length" on the back-end of hidden link, but it's not showing on the front-end. Could you please advise.

June 13, 2023 at 2:22 pm #13818119

Ilyes
Supporter

Languages: English (English ) French (Français ) Arabic (العربية )

Timezone: Pacific/Easter (GMT-06:00)

Hello,

We noticed that your site doesn't have Contact Form 7 Multilingual plugin installed under it,

It is highly recommended having this plugin installed for WPML to work properly with your form.

Could you please do the following :

1- Download and Install Contact Form 7 Multilingual from your WPML profile > Downloads
2- Make sure that you translated the form using this process : https://wpml.org/documentation/related-projects/using-contact-form-7-with-wpml/#translate-your-forms

Please let me know if this helped,

June 14, 2023 at 5:11 am #13821411

akqaF

As i mentioned earlier, i believe it's not about contact form 7 multilingual, i have added custom validation using add_filter function on wordpress and please be noted that we have a separate form with arabic content. and its working fine. Could you please guide us to add translation in return function like add_filter functions. I hope you got my point.

June 14, 2023 at 11:38 am #13824663

akqaF

Please update on my query as soon as possible.

June 14, 2023 at 1:37 pm #13825691

Ilyes
Supporter

Languages: English (English ) French (Français ) Arabic (العربية )

Timezone: Pacific/Easter (GMT-06:00)

Hello,

I had two more insights from our developers,

The code seems to be correct,

If validation goes through AJAX, you will need to have the "language cookie for AJAX" enabled in WPML > Languages.

But this option is enabled by default, but it's worth checking just in case.

Also, one possible cause is that the domain "velocity" is not loaded properly. You can re-scan it from WPML > Theme and plugin localization > select Velocity > re-scan

Then please do a backup of your site and go to WPML > Support > troubleshooting and try all the following buttons: hidden link (Synchronize Forms)

Please let me know if this helped,

June 16, 2023 at 11:01 am #13838713

akqaF

Hi,
Please be informed that neither of the solutions worked. Please also be noted that string already loaded using WPML and added translation on "velocity" domain. Our issue is why is it not working on wordpress "add_filter()" function. Could you please provide us a proper solution for this, why wpml translation not working on wordpress filter functions.

Thanks

June 16, 2023 at 4:48 pm #13841871

Ilyes
Supporter

Languages: English (English ) French (Français ) Arabic (العربية )

Timezone: Pacific/Easter (GMT-06:00)

Hello,

Thank you for your patience,

I understand that the issue might look simple to solve, but apparently it is not related to the code itself.

I would like to ask for temporary access to your test site’s wp-admin and FTP to investigate the issue further.

It is important to note that you should back up your site and database before proceeding, and you can use a plugin like Duplicator for this purpose. Here’s a link to the plugin: http://wordpress.org/plugins/duplicator/

If you do not see the form below, please do not enter your credentials as they will be publicly exposed:

hidden link

For your privacy and security, please ensure that you make your reply a private one.

June 19, 2023 at 10:03 am #13849889

akqaF

Hi,
Please be informed that, we don't have authorization to share the creds for the same. We should be able share any kind of code/ info from the website is possible. Could you please create same kind of scenario(custom validation for contact form text/number field using add_filter function ) in your test environment using the above code i shared earlier and let us know the possible solution as soon as possible.

June 19, 2023 at 2:12 pm #13852407

Ilyes
Supporter

Languages: English (English ) French (Français ) Arabic (العربية )

Timezone: Pacific/Easter (GMT-06:00)

Hello,

It might seem that it took some time to get an answer, but our developer still can't find an issue in the code itself, so that is why we asked for the access, we can save you time and check for your settings ourselves.

Initially, we were going if the variable "your-number" was translated by mistake.

---

Instead of getting the access, I've created a sandbox here: hidden link

I’ve already configured WPML in 2 languages and installed CF7 and WPML plugins

Could you please replicate the issue there, then we will have all we need to check this.

Please note that we only need the theme/plugin and the related functionality, you don’t need to set up a entire website or clone your existing site.

https://wpml.org/faq/how-to-reproduce-issues-and-share-them-with-wpml-support/

Thank you for your cooperation,

June 20, 2023 at 6:12 am #13855481

akqaF

Hi,
Thanks for creating the sandbox account. I have replicated the same issue in sandbox. Please check arabic page hidden link. I have added custom validation for your-number(tel) field in functions.php and added translation for the same by "velocity" domain. Please find the screenshot attached by entering 2 numbers on the field for generating the error. hidden link.
Please check and solve the issue as soon as possible.

June 20, 2023 at 1:04 pm #13859755

Ilyes
Supporter

Languages: English (English ) French (Français ) Arabic (العربية )

Timezone: Pacific/Easter (GMT-06:00)

Thanks for recreating it,

I have shared this with our developer, they are working on it as we speak.

I will get back to you as soon as I get an update,

June 21, 2023 at 5:09 am #13863819

akqaF

Hi,
Thanks for the update. I am waiting for your response. Please update as soon as possible.

June 23, 2023 at 9:22 am #13883183

akqaF

Hi,
Any update on the above?

June 23, 2023 at 10:27 am #13883561

Ilyes
Supporter

Languages: English (English ) French (Français ) Arabic (العربية )

Timezone: Pacific/Easter (GMT-06:00)

Hello,

I would like to express my gratitude once again for your patience and understanding.

I am pleased to inform you that the issue you reported has been successfully resolved in the sandbox environment. Please refer to this screenshot: hidden link

Upon further investigation, it was determined that the existing code did not require any modifications. The initial recommendation to install and activate the Contact Form 7 Multilingual plugin proved to be the correct solution. This plugin is essential for ensuring the proper functionality of your form and your custom code.

To avoid any potential issues in the future, I kindly suggest creating a backup of your website and manually installing the Contact Form 7 Multilingual plugin from your WPML account under the Downloads section.

I trust that this information proves helpful and resolves the matter at hand.

Thank you for your cooperation.

June 26, 2023 at 8:47 am #13893319

akqaF

Hi,
As informed, i have installed "Contact Form 7 Multilingual" on the website and still not working.
Could you please help me on that.

Thanks