• Nabil

    (@nabil_kadimi)


    Hello,

    This scenario happened on 2 testing installations and I checked on some well known french WPMU websites to confirm my conclusion.

    My 1st install:
    – Host: Hosting company (Linux)
    – Language: Default installation then switched to french.

    My 2nd install:
    – Host: local with virtual host (WAMP)
    – Language: Installed WordPress localized (french).

    In both installations I set default language to french, it worked fine on the newly created blogs but RSS feeds of these newly created blogs showed <language>en</language> instead of <language>fr</language>.

    In order to get things to work normally and to have the rss_language set to “fr” I have to set the rss_language on those blogs one by one by visiting …/someblog/wp-admin/options.php… no so practical

    Is there a way to have the rss feed language match the blog language instead of always showing “en”.

    Thank you.

Viewing 5 replies - 1 through 5 (of 5 total)
  • Thread Starter Nabil

    (@nabil_kadimi)

    After a little bit of research, I found this:
    wp-admin/includes/schema.php – line 254:
    'rss_language' => 'en',

    I don’t know if that’s the right place for that but i’ll try and use this code instead
    'rss_language' => defined(WPLANG) ? substr(WPLANG, 0, 2) : 'en',

    Sorry, it didn’t work.

    Moderator Ipstenu (Mika Epstein)

    (@ipstenu)

    🏳️‍🌈 Advisor and Activist

    Instead of that, try this person’s fix: http://rapid-dev.net/2009/11/wordpress-change-rss-channel-language/

    Not a Multisite only bug, alas.

    Thread Starter Nabil

    (@nabil_kadimi)

    Actually that doesn’t fix the problem, rss_language is set by wordpress to “en”, it’s hard coded (refer to my earlier post )

    A clearer example: assume that you have a WPMU and you allow your users three languages, ar, fr and the default en. A user creates a new blog, then set the language from the options page to “arabic”, the user blog rss feed language tag will still contain “en” instead of “ar”, and you can’t (easily) change it using sql as some users use fr or en.

    Thread Starter Nabil

    (@nabil_kadimi)

    The easiest work around in my opinion is to modify feed-rss2.php or any feed-xyz.php file you are using and replace:
    <language><?php echo get_option('rss_language'); ?></language>
    with
    <language><?php echo substr(get_bloginfo('language'), 0, 2); ?></language>

    Moderator Ipstenu (Mika Epstein)

    (@ipstenu)

    🏳️‍🌈 Advisor and Activist

    Looking at http://core.trac.wordpress.org/ticket/13440 they know and they suggest using a plugin or editing site options.

    EVEN IF it’s hard coded, you can STILL override that.

    http://core.trac.wordpress.org/ticket/5517

Viewing 5 replies - 1 through 5 (of 5 total)
  • The topic ‘rss_language doesn't take the site language’ is closed to new replies.