WordPress.org

Make WordPress Core

Opened 6 years ago

Closed 5 years ago

Last modified 2 years ago

#5517 closed enhancement (fixed)

Interface for changing feed language

Reported by: RanYanivHartstein Owned by:
Milestone: 2.5 Priority: normal
Severity: normal Version: 2.3.1
Component: Administration Keywords: reporter-feedback needs-patch, tested
Focuses: Cc:

Description

WordPress currently does not offer any method for changing the feed language, and generally all installations use "en" as feed language, regardless of their locale.

While many feed readers ignore this setting, certain feed readers use it. For e.g., when the feed language is set to Hebrew, certain feed readers will display posts from Right to Left (the writing order in Hebrew) instead of from Left to Right. Another possibility is searching and sorting according to feed language.

I propose setting the default feed language according to the blog locale as set in wp-config.php, as well adding an option to manually override the default in the "Reading" page in the settings section of the administration interface.

Included is a patch for wp-admin/options-reading.php to add the necessary fields for changing the feed language. It was tested to work with 2.4-bleeding (r6475).

Attachments (1)

options-reading.php.r6475.diff (1.7 KB) - added by RanYanivHartstein 6 years ago.
Patch to add interface for changing rss_language

Download all attachments as: .zip

Change History (20)

RanYanivHartstein6 years ago

Patch to add interface for changing rss_language

comment:1 ionfish6 years ago

You know that feeds use get_option('rss_language'), right?

comment:2 lloydbudd6 years ago

  • Milestone set to 2.5
  • Version set to 2.3.1

comment:3 follow-up: RanYanivHartstein6 years ago

I do know that, but do you know that there is no way of setting the value of rss_language?

Please read the ticket carefully.

comment:4 in reply to: ↑ 3 DD326 years ago

Replying to RanYanivHartstein:

I do know that, but do you know that there is no way of setting the value of rss_language?

While there is no UI visible for the option generally, There is a Admin area to change Option values.

Use the options.php page: http://site/wp-admin/options.php

comment:5 RanYanivHartstein6 years ago

That is all fine, but this option can be useful for any WordPress user, and I was hoping WordPress could offer it along with similar locale-related options, such as setting text encoding, time zone, first day of the week, etc.

This would further improve Internationalization of WordPress and would help raise awareness to the language tag in feeds, which might encourage more feed readers to support it.

comment:6 lloydbudd6 years ago

  • Keywords reporter-feedback added

-1

I don't know why anyone would just localize their feed -- so this creates an awkward user experience. If I would set my language/locale then I would be doing it for all aspects of my blog.

Rather than adding an experience to core, it seems that most WordPress members needs would be met by automatically setting in localized versions of WordPress.

comment:7 follow-ups: nbachiyski6 years ago

This option isn't for localizing the feed -- it just tells the feed aggregator, that the content isn't in English.

IMHO, we should automatically align rss_language with the current locale.

comment:8 in reply to: ↑ 7 RanYanivHartstein6 years ago

Replying to nbachiyski:

This option isn't for localizing the feed -- it just tells the feed aggregator, that the content isn't in English.

IMHO, we should automatically align rss_language with the current locale.

This is a good compromise - while I don't think adding the option would be that bad in terms of clutter, having it automatically set is good enough, at least for my needs.

comment:9 nbachiyski6 years ago

RanYanivHartstein, most people won't understand what the feed language is for, so we'd better not add another option.

comment:10 in reply to: ↑ 7 lloydbudd6 years ago

  • Keywords needs-patch added; has-patch tested removed

Replying to nbachiyski:

This option isn't for localizing the feed -- it just tells the feed aggregator, that the content isn't in English.

I know that. That's what I meant. By having an option, you are sort of saying that some how the feed will be a different language then your blog.

Your suggested fix sounds good.

comment:11 ffemtcj6 years ago

  • Keywords has-patch needs-testing added; needs-patch removed

comment:12 hansengel6 years ago

  • Keywords tested added; needs-testing removed

Test was a success. Tested with latest SVN revision (6571). Everything is functional, and changing value from DB causes no problems.

I suggest that we check that the code entered is a valid language code, so it doesn't cause problems later on. I might add a patch and test that out later.

comment:13 follow-up: lloydbudd6 years ago

  • Keywords needs-patch added; has-patch removed

I removed the has-patch and added needs-patch as I don't consider the current patch an appropriate solution.

The proposed solution that we could use a patch for is "automatically align rss_language with the current locale."

comment:14 in reply to: ↑ 13 DD326 years ago

Replying to lloydbudd:

The proposed solution that we could use a patch for is "automatically align rss_language with the current locale."

Would it be possible for it to be a translated text? I dont use non-english languages so i'm not entirely upto speed on how that all works :)

comment:15 RanYanivHartstein6 years ago

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

Solved in #6854

comment:16 Otto426 years ago

  • Resolution fixed deleted
  • Status changed from closed to reopened

Re-opening, as #6854 has zero to do with this issue. rss_language is still defaulted to "en" and there's nowhere at all that sets it to be the same as the locale language.

This issue is still unfixed.

comment:17 Denis-de-Bernardy5 years ago

  • Milestone changed from 2.9 to 2.5
  • Resolution set to fixed
  • Status changed from reopened to closed

#6854 allowed locale-related functions (rtl et al) to set things up properly.

comment:18 nacin2 years ago

  • Keywords changed from reporter-feedback, needs-patch, tested to reporter-feedback needs-patch, tested

This is still lame. I am revisiting this in #13440.

comment:19 nacin2 years ago

In [19784]:

Use the site's locale for the feed language. Provides the same result as language_attributes(). Removes the rss_language option. fixes #13440. see #5517.

Note: See TracTickets for help on using tickets.