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 + +