1
0
mirror of https://git.tt-rss.org/git/tt-rss.git synced 2025-12-13 13:55:55 +00:00

Store language of entries as indicated by the feed.

This commit is contained in:
Tobias Kappé
2018-08-12 14:54:13 +01:00
parent 32c0c07cc1
commit 22a866edb5
5 changed files with 25 additions and 4 deletions

View File

@@ -197,4 +197,13 @@ class FeedItem_Atom extends FeedItem_Common {
return $encs;
}
function get_language() {
$elem = $this->elem;
do {
$lang = $elem->getAttributeNS("http://www.w3.org/XML/1998/namespace", "lang");
$elem = $elem->parentNode;
} while (empty($lang) && $elem instanceof DOMElement);
return $lang;
}
}