From db79be60cc9f544604c02f0d410d476aaf641c96 Mon Sep 17 00:00:00 2001 From: Sam Ruby Date: Thu, 12 Oct 2006 12:57:05 -0400 Subject: [PATCH] dc:language support --- planet/reconstitute.py | 3 +++ tests/data/reconstitute/dc_lang.xml | 14 ++++++++++++++ 2 files changed, 17 insertions(+) create mode 100644 tests/data/reconstitute/dc_lang.xml diff --git a/planet/reconstitute.py b/planet/reconstitute.py index 3149256..30a5cbb 100644 --- a/planet/reconstitute.py +++ b/planet/reconstitute.py @@ -202,6 +202,9 @@ def reconstitute(feed, entry): xentry=xdoc.documentElement xentry.setAttribute('xmlns:planet',planet.xmlns) + if entry.has_key('language'): + xentry.setAttribute('xml:lang', entry.language) + id(xentry, entry) links(xentry, entry) diff --git a/tests/data/reconstitute/dc_lang.xml b/tests/data/reconstitute/dc_lang.xml new file mode 100644 index 0000000..aad92e1 --- /dev/null +++ b/tests/data/reconstitute/dc_lang.xml @@ -0,0 +1,14 @@ + + + + + foo + en-us + +