1) Simple syndicate the feed you are going to pull posts from.
2) Put the following code into the “PHP Code <?php .. ?>” box:
Code:
// Set source language, e.g. English
$s = 'en';
// Set destination language, e.g. German
$d = 'de';
if ($post ['post_content'] == '') {
$post ['post_content'] = $post ['post_excerpt'];
}
$translated = cseo_file_get_contents ( 'http://babelfish.yahoo.com/translate_txt?ei=UTF-8&intl=1&trtext=' . urlencode ( $post ['post_content'] ) . '&lp=' . urlencode ( $s . '_' . $d ) . '&btnTrTxt=Translate' );
$post ['post_content'] = preg_replace ( '/(^.*?<div id="result"><div style="padding:0.6em;">)(.*?)(<\/div>.*?$)/s', "\\2", $translated );
3) Save the settings and pull the feed. Done!
The code above has two variables: $s and $d. Use them to set source and destination language for your feed. For example, if you want to translate the Dutch feed to French, use the following values:
$s = 'nl';
$d = 'fr';
Now you can use the Yahoo! Babel Fish to automatically translate the XML and RSS feeds with the CyberSEO autoblogging plugin.