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 5 replies, has 3 voices.

Last updated by Bigul 1 month, 3 weeks ago.

Assigned support staff: Bigul.

Author Posts
August 21, 2019 at 4:56 am #4428065

dianebourque

Hi WPML,

On this French webpage - hidden link - we use a form built with the "Visual Form Builder Pro".

Unfortunately, the countries are in english. These are included in the file visual-form-builder-pro.php AND this is what we have for code:

public $countries = array("Afghanistan", "Akrotiri and Dhekelia","Albania", "Algeria", ......

Is there a code that I could insert in visual-form-builder-pro.php so that IF in French - then we have the name of countries in French.

I've used this code a lot - but can't seem to get it to work here with "public $countries = array":
<?php if(ICL_LANGUAGE_CODE=='fr'): ?>
PUT FRENCH STUFF HERE
<?php elseif(ICL_LANGUAGE_CODE=='en'): ?>
PUT ENGLISH STUFF HERE
<?php endif;?>

Is the answer in this thread that suggest creating .js files?
https://wpml.org/forums/topic/translation-of-countries-array/

Thanks for helping if possible.

Diane Bourque
WPML Enthusiast

August 21, 2019 at 5:08 am #4428075

Shekhar Bhandari
Supporter

Languages: English (English )

Timezone: Asia/Kathmandu (GMT+05:45)

Hello there,

Welcome to WPML support. I'd be assisting you further on this issue.

Could you please provide the whole code that you are using?

Also, did you contacted the plugin developer and ask if those countries are translation-ready?

Look forward to your reply.

Thanks

August 24, 2019 at 3:11 pm #4451993

dianebourque

Bonjour Shekhar, I also heard from the author of the Visual Form Builder Pro. I will follow his recommendations for now. I hope to solve this soon. Thanks. Diane

August 26, 2019 at 3:52 pm #4460245

Bigul
Supporter

Languages: English (English )

Timezone: Asia/Kolkata (GMT+05:30)

Hi Diane,

I am Bigul from WPML support team. Shekhar is on vacation now. So I am taking care of this ticket. Hope it will be okay for you.

Thank you for the updates. Please try the suggestions of Visual Form Builder Pro team and let me know your feedback.

To help you faster, I've enabled debug information for this support ticket. Please see this link for how to get this information from your site and give it to us: http://wpml.org/faq/provide-debug-information-faster-support/

--
Thanks!

Bigul

August 26, 2019 at 9:04 pm #4461433

dianebourque

Bonjour WPML,
Just to let you know that I installed the latest version of the Visual Form Builder Pro and the countries are now part of .po and .mo - THIS IS WONDERFUL. So my issue is resolved as I can now customize the countries in both French & English. They show up in French on french website and in English on english website. There is also now a document called countries.php in which I can add/delete countries and I can easily modify .po/.mo from WordPress Dashboard with Loco Translate. I should have updated the plugin at first but as the new version requires a new purchase - I was confused as to the status of the plugin and mistakenly assumed that I was using the latest version! Glad this is all sorted out.
Have a great fall 2019!
Diane

August 27, 2019 at 1:12 pm #4467139

Bigul
Supporter

Languages: English (English )

Timezone: Asia/Kolkata (GMT+05:30)

Hi Diane,

Thank you very much for the details. We are happy to know the issue is resolved now. Please free to contact us if you need any help related to WPML.

--
Thanks!

Bigul