Wordpress change rss channel language
I got a problem with http://rapid-dev.net/feed/ language. When I viewed source of the feed it said that no language specified:
... <title>rapid-DEV.net</title> <atom:link href="http://rapid-dev.net/feed/" rel="self" type="application/rss+xml" /> <link>http://rapid-dev.net</link> <description>Accumulate and share your experience</description> <lastBuildDate>Mon, 09 Nov 2009 11:09:04 +0000</lastBuildDate> <generator>http://wordpress.org/?v=2.8.5</generator> <language></language> <sy:updatePeriod>hourly</sy:updatePeriod> <sy:updateFrequency>1</sy:updateFrequency> ...
Then I tried to check wordpress /wp-includes/feed-rss2.php source file to see what was happening:
...
<title><?php bloginfo_rss('name'); wp_title_rss(); ?></title>
<atom:link href="<?php self_link(); ?>" rel="self" type="application/rss+xml" />
<link><?php bloginfo_rss('url') ?></link>
<description><?php bloginfo_rss("description") ?></description>
<pubDate><?php echo mysql2date('D, d M Y H:i:s +0000', get_lastpostmodified('GMT'), false); ?></pubDate>
<?php the_generator( 'rss2' ); ?>
<language><?php echo get_option('rss_language'); ?></language>
<sy:updatePeriod><?php echo apply_filters( 'rss_update_period', 'hourly' ); ?></sy:updatePeriod>
<sy:updateFrequency><?php echo apply_filters( 'rss_update_frequency', '1' ); ?></sy:updateFrequency>
<?php do_action('rss2_head'); ?>
<?php while( have_posts()) : the_post(); ?>
<item>
...
After that, I search in Wordpress Option table to found out what’s value of option_name rss_language by using this sql query:
SELECT * FROM `_options` WHERE `option_name` = 'rss_language'
MySQL returned an empty result set ( 0 row found ).
Finally, I decided to insert one new record with `option_name` = ‘rss_language’ and `option_value` = ‘en’ to my wordpress option table:
INSERT INTO `_options` (`option_id`, `blog_id`, `option_name`, `option_value`, `autoload`) VALUES (NULL, '0', 'rss_language', 'en', 'yes');
Close all browser and try to make some change to make sure caches or global options are refreshed.
Please take note that autoload is yes to make sure it will be load automaticly.
And … and … and … it worked correctly.
Hope it will solve your problem!