Cornerstone Components WPML translation

I had trouble translating components with WPML. The components on the Component page do not appear in WPML’s Advanced Translation. Only the page title can be translated.

So I reached out to WPML, and below is the fix they provided.

add_filter( 'wpml_cornerstone_layout_post_types', 'compsupp8459_wpml_cornerstone_component_post_type' );

function compsupp8459_wpml_cornerstone_component_post_type( $post_types ) {
$post_types[] = 'cs_global_block';

 return array_unique( $post_types );
}

Add it to your function.php (Appearance - Theme File Editor. On the right, choose your theme and click on functions.php).

Warning: Back up first

Just want to share.