WPML插入具有相同名称的类别翻译

There is Wordpress plugin that imports WooCommerce product in 2 languages. There is category that has exactly same name in multiple languages, for example "CAT-123".

How to create and add translated category to the product? Challenges are that it is not allowed to have multiple categories with same name or slug.

Creating products looks like below. Each of these products needs to have category where you can later click in the shop and it does not change the shop language.

 $postId = wp_insert_post([
            'post_title'   => strtoupper($product->ItemCode),
            'post_content' => $product->Description,
            'post_status'  => 'publish',
            'post_type'    => "product",
        ]);

        $translationId = wp_insert_post([
            'post_title'   => strtoupper($product->ItemCode),
            'post_content' => $product->Description2,
            'post_status'  => 'publish',
            'post_type'    => "product",
        ]);

        $trid = $sitepress->get_element_trid($postId, 'post_product');

        $sitepress->set_element_language_details($postId, 'post_product', $trid, $primaryLanguage);
        $sitepress->set_element_language_details($translationId, 'post_product', $trid, $secondaryLanguage);