Skip to content Skip to sidebar

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

Problem:
You are trying to translate an HTML/CSS table using the Advanced Translation Editor, but encounter issues where the CSS styling is lost during the translation process. Previously, the editor only showed the strings of each cell for translation, but now it affects the styling.
Solution:
The issue arises from the mix of CSS and HTML in the translation process. The Advanced Translation Editor is not designed to handle CSS, JavaScript, or PHP; it strips out HTML markup and merges it again after translating the strings. To resolve this, you should use the field for "Custom CSS" on the advanced tab of the HTML widget.

Alternative:
1. Remove the link tag and the CSS from the HTML you are translating to ensure the translation works as expected.
2. Separate concerns by including the CSS in a "Hello Elementor Child Theme". You can set up the child theme following this guide: Setting up the "Hello Elementor Child Theme"
3. Include the stylesheet in the theme file functions.php:

function hello_elementor_child_enqueue_scripts() {
    // Load Font Awesome
    wp_enqueue_style(
        'font-awesome-6',
        'https://cdnjs.cloudflare.com/ajax/libs/font-awesome/6.5.0/css/all.min.css',
        array(),
        '6.5.0'
    );
 
    // Load custom table styles
    wp_enqueue_style(
        'custom-table-style',
        get_stylesheet_directory_uri() . '/css/custom-table.css',
        array(),
        '1.0'
    );
}
add_action('wp_enqueue_scripts', 'hello_elementor_child_enqueue_scripts', 20);

4. Move your CSS to a file at /css/custom-table.css.

This solution might be outdated or not applicable to your specific case. We highly recommend checking related known issues at https://wpml.org/known-issues/, verifying the version of the permanent fix, and confirming that you have installed the latest versions of themes and plugins. If the issue persists, 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 3 replies, has 0 voices.

Last updated by frederikP-8 5 days, 22 hours ago.

Assisted by: Andreas W..

Author Posts
September 10, 2025 at 9:49 am #17389917

frederikP-8

Background of the issue:
I'm trying to translate an HTML/CSS table with the advanced translator. Previously, when I translated HTML, it only showed the strings of each cell for translation. Now, when I copy from one to the other, all the styling is lost. The issue can be seen at: hidden link

Symptoms:
The advanced translator is not showing the strings of each cell for translation as it did previously, and copying results in loss of CSS styling.

Questions:
How can I translate an HTML/CSS table and preserve the CSS styling?

September 10, 2025 at 10:37 am #17390110

Andreas W.
WPML Supporter since 12/2018

Languages: English (English ) Spanish (Español ) German (Deutsch )

Timezone: America/Lima (GMT-05:00)

Hello,

Thank you for the provided details!

It appears that the whole table is unexpectedly rendered inside the Advanced Translation Editor.

Could you please provide me with more details about how to integrate this HTM/CSS Code into the original content?

Are you using an Elementor HTML Widget?

Could you please try to replicate the issue in the same way on the following sandbox?

One-Click-Login:
hidden link

Make sure to leave me a comment on this ticket once you are done with this task.

Best regards
Andreas

September 10, 2025 at 11:50 am #17390449

frederikP-8

Hey thanks

I've replicated the issue in a page called "Problem page".

And yes it is an elementor HTML widget.

Thank you.

Screenshot 2025-09-10 at 12.49.28.png
September 10, 2025 at 12:09 pm #17390522

Andreas W.
WPML Supporter since 12/2018

Languages: English (English ) Spanish (Español ) German (Deutsch )

Timezone: America/Lima (GMT-05:00)

Basically, the problem is the mix of CSS and HTML.

The Advanced Translation Editor was not designed to translated CSS, JavaScript, PHP - it even strips out HTML markup and merges it again after translating the strings.

If you remove the link tag and the CSS, the translation will work as expected.

The ideal way would be to separate concerns and include the CSS in a Hello Elementor Child Theme.

1) Setting up the "Hello Elementor Child Theme":
hidden link

2) Include the stylesheet inside the theme file functions.php:

function hello_elementor_child_enqueue_scripts() {
    // Load Font Awesome
    wp_enqueue_style(
        'font-awesome-6',
        '<em><u>hidden link</u></em>',
        array(),
        '6.5.0'
    );

    // Load custom table styles
    wp_enqueue_style(
        'custom-table-style',
        get_stylesheet_directory_uri() . '/css/custom-table.css',
        array(),
        '1.0'
    );
}
add_action('wp_enqueue_scripts', 'hello_elementor_child_enqueue_scripts', 20);

3. Move your CSS to a file at /css/custom-table.css

Now, this is usually a job for an independent developer and usually not something we offer on support, but if you need my assistance with setting this up, I will be glad to help.

September 10, 2025 at 1:20 pm #17390928

frederikP-8

Hey,

Thanks for identifying the issue.

I went with a much easier solution where I just added the styling to the "Custom CSS" on the advanced tab of the HTML widget and it worked perfectly.

Again thank you for your help.