Make WordPress Core

Opened 17 years ago

Closed 16 years ago

Last modified 7 months ago

#5143 closed enhancement (fixed)

New option for setting RSS Feed language

Reported by: ranyanivhartstein's profile RanYanivHartstein Owned by: nbachiysk's profile 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 17 years ago.
Patch to add RSS Language option to the "Reading" page

Download all attachments as: .zip

Change History (9)

@RanYanivHartstein
17 years ago

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

#1 @foolswisdom
17 years ago

  • Milestone set to 2.4

#2 @foolswisdom
17 years ago

  • Owner changed from anonymous to nbachiysk

#3 @ffemtcj
16 years ago

  • Milestone changed from 2.5 to 2.6

#4 follow-up: @tai
16 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'));

#5 in reply to: ↑ 4 @ran-hart
16 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.

#6 @RanYanivHartstein
16 years ago

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

Solved in #6854

#7 @santosj
16 years ago

  • Milestone changed from 2.9 to 2.7

This ticket was mentioned in PR #5590 on WordPress/wordpress-develop by @dmsnell.


7 months ago
#8

See #5143

This patch refactors wp_targeted_link_rel to be more reliable and clear by using the HTML API to replace existing PCRE code. It provides backwards compatability for the rel filter by creating a quick HTML string representing the opening A tag for the matched element and providing the href, rel, and target attributes on that tag.

Note: See TracTickets for help on using tickets.