Skip to content Skip to sidebar

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.

Sun Mon Tue Wed Thu Fri Sat
- 9:00 – 13:00 9:00 – 13:00 9:00 – 13:00 9:00 – 13:00 9:00 – 13:00 -
- 14:00 – 18:00 14:00 – 18:00 14:00 – 18:00 14:00 – 18:00 14:00 – 18:00 -

Supporter timezone: America/Los_Angeles (GMT-07:00)

Tagged: 

This topic contains 5 replies, has 0 voices.

Last updated by Bobby 17 hours, 26 minutes ago.

Assisted by: Bobby.

Author Posts
July 17, 2025 at 6:33 pm #17247731

emilyM-7

Background of the issue:
I am trying to manage French punctuation in WordPress, which requires spaces before characters like colons or question marks. On my site, hidden link, adding these spaces can cause unexpected line breaks, leaving punctuation marks on their own line. I am using WPML's advanced translation editor, but it doesn't seem to recognize shortcodes or non-breaking spaces to prevent this behavior.

Symptoms:
Unexpected line breaks occur with French punctuation, leaving punctuation marks hanging on their own line.

Questions:
What is a way to avoid unexpected line breaks with French punctuation in WPML's advanced translation editor?

July 18, 2025 at 4:29 pm #17251480

Bobby
WPML Supporter since 04/2015

Languages: English (English )

Timezone: America/Los_Angeles (GMT-07:00)

Hi there,

I’ve reviewed your site, and the section shown in your screenshot appears fine on my end (tested on a MacBook Pro 13").

From what I can see, the issue seems to stem from the French version requiring more space due to longer text. The current margin/padding settings likely fit well for the English content but become tight in French, leading to layout issues.

To resolve this, you may want to manually increase the margin or padding specifically for the French version. Here’s how you can do that:

https://wpml.org/documentation/translating-your-contents/using-different-translation-editors-for-different-pages/

Let me know your results, please.

July 18, 2025 at 6:05 pm #17251795

emilyM-7

We have manually fixed the problem by removing the space, but this is incorrect for French grammar. Please reread my original question.

In French punctuation, a space is required before characters such as question marks and colons.

For example, the correct spacing in french would be:

Qu'est-ce que c'est ?

And not:

Qu'est-ce que c'est?

The screenshot shows the correct punctuation with a space before the question mark. This is a dynamic area with different kinds of text on every page. It is not possible to change padding for every different instance of the text. Changing the padding does not assist fully in any case as the size of the container changes according to screen size. This is also not the only place on the site where this occurs but is one example among many.

A proper fix would be to allow non-breaking spaces to be added via the WPML translation editor, but currently, it is ignoring all attempts to use non-breaking space characters.

July 22, 2025 at 5:21 am #17257773

Bobby
WPML Supporter since 04/2015

Languages: English (English )

Timezone: America/Los_Angeles (GMT-07:00)

Thank you for the additional explanation, I understand the issue now.

This is a known issue with the Advanced Translation Editor, and a fix is currently being considered for the next major release of WPML.

In the meantime please review the reply I shared in the following thread:
https://wpml.org/forums/topic/add-a-blank-space-at-the-beginning-of-the-translation/#post-14626229

There are two suggested workarounds, please review and let me know your results.

July 22, 2025 at 12:53 pm #17259396

emilyM-7

Thank you for replying. The link shared goes to a page that says "This is a private ticket". Could you please copy/paste the relevant text here?

July 22, 2025 at 5:42 pm #17260692

Bobby
WPML Supporter since 04/2015

Languages: English (English )

Timezone: America/Los_Angeles (GMT-07:00)

Thank you for letting me know, this is the reply slightly adjusted to make sense out of context.

When using ATE you can add a non breaking space using

&nbsp

, however, there is a known issue with this that our team is working on resolving.

There are 2 workarounds at the moment

1. wrap the text in a span tag like this:

<span class="custom-nbsp">your text</span>

and add this CSS to the theme options page, style sheet or unter Customizer > Custom CSS:

.custom-nbsp {
    white-space: pre;
}

2. Manually edit the translation outside of ATE and add the space.

- Edit the page in the default language
- Right-click on the language switcher in the top header (exit Guttenberg fullscreen to see)
- Switch to the translation and manually edit in the page builder to add the space (I believe you are currently doing this)