• Resolved narcisF

    (@filipnarcis)


    Hi,
    We tried to integrate a translated woocommerce feed, we translated all fields with custom code but the code for product description only works if there is only one paragraph. If more html elements ore paragraphs is in description, translation doesn’t work anymore. Can you help? This is the code:

    function translate_content($value){
    $orgvalue = $value;
    $trp_instance = TRP_Translate_Press::get_trp_instance();
    
    $translator = $trp_instance->get_component('translation_render');
    $content = '';	
    $value = str_replace('<ul>', '', $value);
    $value = str_replace('</ul>', '', $value);
     $value = str_replace('<li>', '<p>', $value);
     $value = str_replace('</li>', '</p>', $value);
     $value = str_replace('<span>', '<p>', $value);
     $value = str_replace('</span>', '</p>', $value);	
    $pieces = explode("</p>", $value);
    	
    foreach ($pieces as $key => $val) {
    $translation = $translator->process_strings(array(strip_tags(trim($val))),'ro_RO');
    		// $content .= "#" . $val . "#";
    	if ($translation){ $content .= " " . $translation[0];}		
    	}
    	//return $orgvalue;
    	if(empty($content)){ return $orgvalue;}
    	return $content;
    
    }

    The page I need help with: [log in to see the link]

Viewing 2 replies - 1 through 2 (of 2 total)
  • Plugin Support Alex

    (@alexcozmoslabs)

    Hi,

    From what I can tell, we currently don’t support full posts in RSS feeds from what I can tell.
    We’re ignoring <![CDATA[ texts as usually they are causing more issues than they solve.

    Did you try Woo Product Feed plugin — https://www.ads-software.com/plugins/woo-product-feed-pro/. See if it gives better results.

    Thread Starter narcisF

    (@filipnarcis)

    Hi again,
    I also tried ctx pro (premium) and Product Feed PRO for WooCommerce (also premium) on wich they have integration with translatepress but they both not working to generate a feed on another language. Can you provide us with a solution or investigate further? Thank you

Viewing 2 replies - 1 through 2 (of 2 total)
  • The topic ‘Integrate with wp all export’ is closed to new replies.