Skip Navigation

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.

Our next available supporter will start replying to tickets in about 1.49 hours from now. Thank you for your understanding.

We have a longer than usual waiting time. Please make sure to check out the Known Issues page and Minimum Requirements before reporting any issue.
Sun Mon Tue Wed Thu Fri Sat
- 9:00 – 14:00 9:00 – 14:00 9:00 – 14:00 9:00 – 14:00 9:00 – 14:00 -
- 15:00 – 18:00 15:00 – 18:00 15:00 – 18:00 15:00 – 18:00 15:00 – 18:00 -

Supporter timezone: Asia/Dhaka (GMT+06:00)

This topic contains 2 replies, has 0 voices.

Last updated by kevinL-62 1 day, 17 hours ago.

Assisted by: Prosenjit Barman.

Author Posts
November 14, 2024 at 4:36 pm #16404138

kevinL-62

Background of the issue:
I am trying to add Line Break CSS in the Elementor text box for a translated version of a page (Japanese) on my site. After editing and saving, it looks good. I have applied the global CSS to my theme global setting (the gem) and applied a CSS class to the Elementor text box like this: 新規ユーザー
ボーナス.

Symptoms:
If I make any changes to the page in the default language (English) and save each language with ATE, the change on the Japanese text box disappears.

Questions:
How can we keep the page synchronized while maintaining the line-break CSS in the translated copy?

November 15, 2024 at 7:58 am #16405984

Prosenjit Barman
Supporter

Languages: English (English )

Timezone: Asia/Dhaka (GMT+06:00)

Hello There,
Thanks for contacting WPML Support.

From your description, I understood that you Translated the contents first using WPML Translation Editor and later manually edited the Translation using Elementor Editor. Please note that the mix of translation methods you're using is not typically recommended, as it can lead to such conflicts. To avoid this issue, it's advisable to stick to one method of translation.

If you have started translating content using the ATE, please don't manually alter the translation using the WordPress Editor. Since the translation memory isn't shared between the translation method or editors, any manual changes you make will be overridden when you update the translation again using the ATE. I hope you can understand.

If you want to apply a line break using CSS for the translation, you can do that by specifically defining the CSS for that language, instead of manually making changes to the translation. You can target the Chinese language with CSS like this:

html[lang="zh-hans"] .your-css-class {
    /* Specific styles for Chinese */
    white-space: pre-wrap;
    color: red; /* Example styling */
}

Replace .your-css-class with the actual class you're using (e.g., .line-break and value for lang with the actually lang value for the Chinese language. If you inspect the Chinese version, you'll see that value in the HTML tag.).

I hope you can understand. If you have any more questions or need further assistance, please feel free to reach out. I'll be happy to help.

Best regards,
Prosenjit

November 15, 2024 at 10:02 am #16407037

kevinL-62

Dear Prosenjit,

Thank you! I would like to clarify the steps to make it work.

1. So I will apply the CSS you provided in the gem global custom CSS.
2. I only edit the translation in ATE but not edit with elementor.
3. When I need an line-break, for a specific position of the sentennse, for example.

"I want to fix the line break issue. "
Should I just press Enter at the position I wanna break?
Or I have to add a CSS code there in the ATE?

"I want to fix
the line break issue."

"I want to fix <be class=".your-css-class">
the line break issue."

And I want this line break to be applied screen width specific . For example:only Mobile will apply this line-break CSS rule.
I were able to make it work if I add the CSS class in elementor. but it was overwritten.

4. Since it's ATE, all the setting there won't be overwritten unless the default language has been changed.

Thank you for your clarification.