Skip Navigation

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

Problem:
The client is trying to translate placeholders for address fields in a form created with WPForms. The placeholders for the 6 fields in the address group are not available for translation.
Solution:
We recommend the following steps to resolve the issue:
1. Open the

.../wp-content/plugins/wpml-wpforms/wpml-forms-config.xml

file.
2. Navigate to line 57.
3. Replace the existing code with:

<property>code</property><br /><property>address1_placeholder</property><br /><property>address2_placeholder</property><br /><property>city_placeholder</property><br /><property>postal_placeholder</property><br /><property>state_placeholder</property><br /><property>country_placeholder</property>

4. Make a small modification to your form and translate it again.
Please ensure you have a full backup of your website before making any changes.

Regarding the WP memory requirement, it is stated that "PHP 7.0 or above with memory limit of at least 128MB while 256MB is recommended" refers to the WP Memory limit.

If this solution does not seem relevant to your issue, please open a new support ticket with us.

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

Last updated by Marsel Nikolli 1 year, 2 months ago.

Assisted by: Marsel Nikolli.

Author Posts
November 8, 2023 at 3:36 pm #14758707

martinP-99

I am trying to: Translate placeholder from address fields

Link to a page where the issue can be seen: hidden link

I expected to see:

Instead, I got:

November 9, 2023 at 10:46 am #14764815

Marsel Nikolli

Hi,
Thank you for contacting WPML Support.

1) Could you please tell me how you are creating that form and how are you translating the rest of the fields in the form?

2) It's not related to the issue, but according to your debug.info, the WP memory limit needs to be increased. PHP memory is fine, but WordPress uses 40Mb as default. The minimum requirements for WPML are 128 MB. (Kindly check this page: https://wpml.org/home/minimum-requirements/)

You can increase it by adding the following code in your wp-config.php file right before the:
/* That's all, stop editing! Happy publishing. */ line:

/* Memory Limit */
define('WP_MEMORY_LIMIT', '256M');
define( 'WP_MAX_MEMORY_LIMIT', '256M');

Looking forward to your reply,
Marsel

November 9, 2023 at 12:53 pm #14767043

martinP-99

Hi Marsel,

1) The form was done in WPForm and it's a field group called Address that came with 6 predefined fields. See picture, "Espace réservé" = "Placeholder". WPML have done the Block Translation WPForm type to do the job, but all the placeholder for the 6 fields in the address group are missing for translation.

2) In the link you provided for the minimum requirement for WPML, there is no statement about WP memory need!

Thank you.

Constructeur_WPForms_‹_Dimension_Transport_inc__—_WordPress.jpg
November 9, 2023 at 3:41 pm #14769399

Marsel Nikolli

Hi,

This issue has already been reported to the compatibility team and they suggested the following workaround.

Could you please try the following steps:
- Open .../wp-content/plugins/wpml-wpforms/wpml-forms-config.xml file.
- Go to line 57
- Change the following code from:

			<property>code</property>

To:

			<property>code</property>
			<property>address1_placeholder</property>			
			<property>address2_placeholder</property>
			<property>city_placeholder</property>
			<property>postal_placeholder</property>
			<property>state_placeholder</property>
			<property>country_placeholder</property>

- Add a small modification to your form and translate it again.

Note: Please make sure you have a full backup of your website before making any changes.

* On the link I sent you before the:
"PHP 7.0 or above with memory limit of at least 128MB while 256MB is recommended".
is referred to the WP Memory limit.

Please let me know if this works out for you.

Looking forward to your reply,
Marsel