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.

This topic contains 20 replies, has 2 voices.

Last updated by Nigel 2 years, 6 months ago.

Assisted by: Nigel.

Author Posts
July 9, 2022 at 7:59 am #11634719

sylvainG-5

Tell us what you are trying to do?
Hi,
I have a text for my event that contains several parts.
hidden link

It appears in one blocks in the translation page if i don't add row, which is annoying when i am making a small change, all chane and need to be edit again.

I can divide in Bloacks adding in between chapters:
[vc_row][vc_column][/vc_column][/vc_row]

BUT then the space is huge, especially after a Sortcode for banner or after a video and looks even more on mobile view.

Any other way to make the texts devided in Blocks in the translastion without using [vc_row][vc_column][/vc_column][/vc_row] , i tried [vc_empty_space height="3px"] but it doesn't slipt in block. it remains in 1 block

thanks

Is there any documentation that you are following?

Is there a similar example that we can see?

What is the link to your site?

July 9, 2022 at 10:47 am #11635039

sylvainG-5

hidden link
hidden link
thanks

July 11, 2022 at 12:35 pm #11642557

Nigel
Supporter

Timezone: Europe/Madrid (GMT+01:00)

Hi there

I'm trying to understand the issue.

You are using WP Bakery page builder, adding modules, and the issue is that when you translate the page, the whole content of a module must be translated in one go, rather than translating smaller parts of the module individually, yes?

That happens with the Classic editor (screenshot classic.png).

If you use the Advanced Translation Editor then it automatically breaks up the text into smaller units that can be translated separately (screenshot ate.png).

ATE is a more advanced editor, and this is one of the benefits.

ate.png
classic.png
July 11, 2022 at 1:05 pm #11642775

sylvainG-5

Thanks for your reply.
Actually, MEC Event uses Classic editor.
But I am adding some WP Bakery page builder to add some separations.
hidden link

thanks

July 11, 2022 at 2:03 pm #11643327

Nigel
Supporter

Timezone: Europe/Madrid (GMT+01:00)

When using the Classic translation editor the post content isn't broken up into chunks of text in the same way that it is using the Advanced Translation Editor (as in my earlier screenshot), the content is taken together as a whole.

Except, where using a page builder (WPML recognises the WPBakery shortcodes for rows and colums) the Classic translation editor will attempt to break up content, e.g. into chunks based on the rows, but it is s cruder process than is achieved with ATE.

The only way to break up the content into smaller chunks for translation (without modifying the content to introduce extra rows, or similiar) is to switch to using ATE for translations.

July 11, 2022 at 2:31 pm #11643587

sylvainG-5

Hi,
We try to use ATE, but unfortunately, it was creating an issue and WPML support asked us to get back to Classic translation editor (see last ticket or the one before)

Ok, so that's where we are, right now i am using code from Bakery builder to make the texts into chunks:
But is there any other code than: [vc_row][vc_column][/vc_column][/vc_row] thant can split the whole paragram into chunks? Reducing the space created by the code?
I am also thinking we may be able to use other codes, like from Elementor (or other). It won't be treated by my WP and WP Bakery, but will be recognized as a new chunks by WPML translation.

thanks

July 12, 2022 at 6:53 am #11647147

sylvainG-5

The problem using ATE was during this ticket: https://wpml.org/forums/topic/blocks-in-some-translation-pages-are-missing/page/3/

Could you please advise me on a trick to create the chunks?
thanks

July 12, 2022 at 7:47 am #11647413

Nigel
Supporter

Timezone: Europe/Madrid (GMT+01:00)

I checked with my colleagues, but they don't have any suggestions for forcing the classic editor to break the post body into smaller chunks for translation, it's just not designed to work that way.

The Advanced Translation Editor is much newer and more feature-rich, but I understand you need to keep using the Classic editor on this site because of the age of the site and the existing translations that would be lost.

I'm sorry but I don't have a solution for you.

July 12, 2022 at 10:07 am #11648677

sylvainG-5

Thanks, then maybe we need to fix the prior issue for ATE to work on my website 🙏

July 12, 2022 at 11:43 am #11649755

sylvainG-5

Thanks for your help Nigel. What are the codes of Elementor that chunks in WPML translation. I can make a try

July 12, 2022 at 1:13 pm #11651099

Nigel
Supporter

Timezone: Europe/Madrid (GMT+01:00)

I'm not sure Elementor uses shortcodes. Divi does. You could try these to see if any of them work to break the text into chunks.

et_pb_section
et_pb_row
et_pb_text

Note that you will need to register the shortcodes and have them just return the unaltered content, otherwise the shortcodes won't be recognised and will be displayed as content themselves.

e.g.

add_shortcode( 'et_pb_section', function( $atts = [], $content = null ){

    return $content;
});
July 13, 2022 at 8:38 am #11656501

sylvainG-5

THanks Nige, how do you register Shortcodes???
Is it adding the CSS like you showed?

July 13, 2022 at 9:37 am #11657527

Nigel
Supporter

Timezone: Europe/Madrid (GMT+01:00)

You use the WordPress function add_shortcode, as in my example above.

See https://developer.wordpress.org/reference/functions/add_shortcode/

You can add the example code in my previous reply to your theme's functions.php file (or use a plugin such as Code Snippets).

My example registers the shortcode et_pb_section, but the shortcode doesn't do anything, it will just print whatever is within the opening and closing shortcode tags.

Test with that shortcode to see if it triggers breaking the post body into chunks. If that doesn't work you could try the row or text shortcodes.

July 16, 2022 at 2:19 am #11677707

sylvainG-5

Thanks Nigel,
Should I place some /** ...*/ ?
and does this title and example will be ok ?

/**
Test Divi shortcodes to break the text into chunks in wpml tranlsation.

add_shortcode( 'et_pb_section', function( $atts = [], $content = null ){

return $content;
});

*/

🙏

Screenshot 2022-07-16 at 10.15.01.png
July 18, 2022 at 6:32 am #11682877

Nigel
Supporter

Timezone: Europe/Madrid (GMT+01:00)

Those delineate comments, and you have wrapped the whole of the code in comments, so it won't do anything.

Try this:

/**
 ** Test Divi shortcodes to break the text into chunks in wpml tranlsation.
 */

add_shortcode( 'et_pb_section', function( $atts = [], $content = null ){

return $content;
});

That will register the et_pb_section shortcode, which will simply output whatever is inside it without changes. But, it may trigger breaking the text into chunks in the classic WPML editor.