Skip to content Skip to sidebar

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

Problem:
When translating notification emails from WPForms using WPML, the translated text appears as a solid block without proper paragraph breaks, unlike the original language which is correctly formatted with paragraphs.

Solution:
If you're experiencing this issue, we recommend formatting your original email message using HTML tags. Instead of relying on simple line breaks (pressing ENTER for a new line and twice for a new paragraph), use

<p>

tags for paragraphs or

<span>

tags for line breaks. After applying these tags to your original email message, update the translation in the Advanced Translation Editor (ATE). This should present the text in separate boxes for translation, maintaining the intended formatting when the email is sent in both the original language and the translation.

Please note that this solution might be irrelevant if it's outdated or not applicable to your case. If the issue persists, we highly recommend checking the related known issues, verifying the version of the permanent fix, and confirming that you have installed the latest versions of themes and plugins. If you still need assistance, please open a new support ticket.

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 3 voices.

Last updated by Waqas Bin Hasan 1 year, 5 months ago.

Assisted by: Waqas Bin Hasan.

Author Posts
March 4, 2024 at 11:33 am #15369086

dusanV-2

I have translations of the notification email that WPForms sends. In the native language, the text is split into paragraphs, but the translation, is sent as a solid text. It is a text email that the client receives as a confirmation. If I add <br> to the original text, there is a larger double space between paragraphs in the original and in the translation, the text wraps to a new line.

March 4, 2024 at 11:55 am #15369225

Mateus Getulio
Supporter

Languages: English (English ) Portuguese (Brazil) (Português )

Timezone: America/Sao_Paulo (GMT-03:00)

Hello,

Thanks for contacting us.

Before your ticket is assigned to one of my colleagues, please allow me to walk you through some initial debugging steps. This will help speed up the support process.

1) Can you please check if the issue happens when only WPML plugins and WP Forms are activated, all other plugins are disabled? While using the WP default theme.

Please make sure to have a backup or test this on the staging site.

2) Make sure you are following the next docs and have translated the forms and string coming from WP Forms plugin.

- https://wpml.org/documentation/related-projects/creating-multilingual-forms-using-wpforms-and-wpml/

Please let us know if the issue persists and we'll reassess.

Thank you.

March 4, 2024 at 1:05 pm #15369674

dusanV-2

After disabling all plug-ins and templates, the problem remained. The texts are translated correctly via Advanced Translation Editor. Only the paragraphs are missing.

March 5, 2024 at 7:05 am #15372698

Waqas Bin Hasan
WPML Supporter since 05/2014

Languages: English (English )

Timezone: Asia/Karachi (GMT+05:00)

Hi,

Thank you for the updates, I am assigned this ticket and 'll try my best to help you resolve the matter.

Can you please create a minimal setup on the following Sandbox site? It is a fresh installation with WPML plugins. You can upload your theme and plugins here and setup as needed.

You can use this plugin https://wordpress.org/plugins/download-plugins-dashboard/ to enable downloadable links for plugins and themes in Plugins and Themes pages respectively. Then you can upload in the sandbox via Plugins/Themes -> Add New.

A minimal setup to reproduce the issue is necessary. This way we can see if this only happens on your server or it's a global problem. Then I can also request expert insights from our 2nd tier team, to investigate the issue.

Please find below the Sandbox details:

Auto Login: hidden link

Please take your time and reply when the site is ready. Once you are able to reproduce the issue, please write down detailed steps about how one can reproduce the issue on another fresh installation.

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

Regards.

March 5, 2024 at 10:35 pm #15376668

dusanV-2

Can I send email via PHP? If yes, through which domain?

March 6, 2024 at 7:03 am #15377193

Waqas Bin Hasan
WPML Supporter since 05/2014

Languages: English (English )

Timezone: Asia/Karachi (GMT+05:00)

You can use this plugin https://wordpress.org/plugins/log-emails/ to log outgoing emails.

March 7, 2024 at 11:33 pm #15387023

dusanV-2

I uploaded my paid version of WPForms, set it up, added WP Mail SMTP. After submitting the form in the English version, the email is sent to the user without paragraphs.

March 8, 2024 at 4:28 am #15387257

Waqas Bin Hasan
WPML Supporter since 05/2014

Languages: English (English )

Timezone: Asia/Karachi (GMT+05:00)

Thank you for the updates, I'm looking into this and 'll get back to you accordingly.

March 8, 2024 at 10:10 am #15388242

Waqas Bin Hasan
WPML Supporter since 05/2014

Languages: English (English )

Timezone: Asia/Karachi (GMT+05:00)

Thank you for your patience and cooperation.

I did some tests and noticed that since you had added the email message without any HTML tags, but using simple line breaks (i.e. pressing ENTER for new line and twice for new para) - this is stripped out in ATE when translating.

That's the reason you see all that text in one single box for translation, in the ATE.

So I tried a few things, that I used SPAN and then used P tags to format that text in form's email notifications (see attached). Then updated the translation. In ATE, these 3 paragraphs were presented separately.

Now, when I send form in English, I can see the text separated by the paragraphs.

Does this helps resolving the problem? Or if not, can you please write me detailed steps to reproduce the problem?

wpform-notice-email-en.jpg
wpform-notice-ATE.jpg
wpform-notice.jpg
March 11, 2024 at 4:05 am #15393217

dusanV-2

Thank you for solving the problem. Just to add that even in HTML there must not be paragraphs that are then converted to
in the base language.