WordPress.org

Make WordPress Core

Opened 7 years ago

Closed 6 years ago

Last modified 6 years ago

#5143 closed enhancement (fixed)

New option for setting RSS Feed language

Reported by: RanYanivHartstein Owned by: nbachiysk
Milestone: 2.7 Priority: normal
Severity: normal Version:
Component: Administration Keywords: has-patch tested
Focuses: Cc:

Description

By default, Wordpress sets RSS feed language to "en", and there is no option for changing that setting. However, certain feed readers use that setting to decide how to display the feed.

For example, setting the RSS feed language to "he" (Hebrew, written from right to left), causes certain feed readers to display the feed from right to left, which is the correct way to display it.

Setting the language should be considered at worst harmless - feed readers that ignore it will keep ignoring it no matter what language is specified.

I created a patch that adds this option to the "Reading" options page. It doesn't change the default automatically according to blog locale, it just exposes a UI for changing it manually.

However, this solution is a bit of a hack - since Wordpress is now locale-aware, it should be able to set the proper RSS feed language during installation. This could perhaps be set in the localization xx_XX.php file.

I tested the patch on the trunk, and I have used it in a Hebrew-localized version of WordPress for some time now.

Attachments (1)

options-reading.php.diff (1.6 KB) - added by RanYanivHartstein 7 years ago.
Patch to add RSS Language option to the "Reading" page

Download all attachments as: .zip

Change History (8)

RanYanivHartstein7 years ago

Patch to add RSS Language option to the "Reading" page

comment:1 foolswisdom7 years ago

  • Milestone set to 2.4

comment:2 foolswisdom7 years ago

  • Owner changed from anonymous to nbachiysk

comment:3 ffemtcj6 years ago

  • Milestone changed from 2.5 to 2.6

comment:4 follow-up: tai6 years ago

How about making the default value "en" gettexed?

in /wp-trunk/wp-admin/includes/schema.php

add_option('rss_language', 'en');

->

add_option('rss_language', __('en'));

comment:5 in reply to: ↑ 4 ran-hart6 years ago

Replying to tai:

How about making the default value "en" gettexed?

in /wp-trunk/wp-admin/includes/schema.php

add_option('rss_language', 'en');

->

add_option('rss_language', __('en'));

This approach could be useful for other options on schema.php - such as the first day of the week or the time zone.

comment:6 RanYanivHartstein6 years ago

  • Resolution set to fixed
  • Status changed from new to closed

Solved in #6854

comment:7 santosj6 years ago

  • Milestone changed from 2.9 to 2.7
Note: See TracTickets for help on using tickets.