#014076: Language attribute for feed items

Description:

It is currently not possible to define a language for a feed item (at least for RSS2 it is not rendered). It should be possible to define the language of a feed item, if it differs from the main language of the feed. This is important for multilingual feeds.

The "xml:lang" attribute can be used, if a feed definition does not allow the item language to be defined in a different way.

I'd expect the behavior to be like this:


$feed = new ezcFeed();

$feed->title = 'eZ news feed';
$feed->language = "en";
// ...

$item = $feed->add( 'item' ); 

$item->title = 'eZ Components 2007.1 released';
$item->language = "de";
// ...

echo $feed->generate( 'rss2' );

will create a feed like this:



<?xml version="1.0" encoding="utf-8"?>
<rss version="2.0">
  <channel>
    <title>eZ news feed</title>
    <language>en</language>
    <!-- ... -->
    <item xml:lang="de">
      <title>eZ Components 2007.1 released</title>
      <!-- ... -->
    </item>
  </channel>
</rss>

Environment:

Operating System:
PHP Version: (please be specific, like '4.4.3' or '5.1.5')
Database and version:
Browser (and version):


- Attachments

No attachments for this issue.


- Comments

I patched the Atom-File while RSS2 is still working with languages.
I also patched the entry file to add support for different languages on Feed-items of ATOM-feeds.

You can find the commits at http://git.forge.ymc.ch/?p=ezcomponents.git;a=shortlog;h=refs/heads/feed-languageurl .

#260800 by Emanuel Sprung on March 17th, 2009 [Permanent Link]
- Attachments: » feed-language.patch (A language patch for 2 files: atom.php and enrty.php of the ezcFeed component)

Implemented in SVN rev. 10644.

#262276 by Alexandru Stanoi on July 13th, 2009 [Permanent Link]

- History
Properties
Type Enhancement
Priority Medium
Component Components » Feed
Affects Unknown
Fix Version 2009.2 sprint 1 - eZ components 2009.2 sprint 1
Reporter Tobias Schlitt
Responsible Alexandru Stanoi
Status 0 Closed
Resolution Implemented
Created December 7th, 2008
Updated July 13th, 2009
Resolved July 13th, 2009
 
Navigation [Permanent Link]
Previous Issue
Back to Issues List
Next Issue: #015537
  Graph shows to small and truncated rotated axis labels