How to get shared CSS body class between translated WPML pages [closed]

It’s not a good practice to use post name to style your page. Maybe you can use template page.

But if you still want to do it, you can do something like this:

function add_default_language_slug_class( $classes ) {
    global $post;
    if ( isset( $post ) ) {
        $default_language = wpml_get_default_language(); // will return languague code of your default language for example 'en'
        // get the post ID in default language
        $default_post_id = icl_object_id($post->ID, 'post', FALSE,$default_language);
        // get the post object
        $default_post_obj = get_post($default_post_id);
        // get the name
        $default_post_name = $default_post_obj->post_name;
        // add default language post name to body class
        $classes[] = $default_post_name;
    return $classes;
add_filter( 'body_class', 'add_default_language_slug_class' );