diff --git a/xml2po/xml2po/modes/mallard.py b/xml2po/xml2po/modes/mallard.py
index 2dac38a..82ff207 100644
--- a/xml2po/xml2po/modes/mallard.py
+++ b/xml2po/xml2po/modes/mallard.py
@@ -130,5 +130,14 @@ class mallardXmlMode(basicXmlMode):
         self._output_images(root,msg)
 
     def postProcessXmlTranslation(self, doc, language, translators):
+        """Sets a language in "doc" tree."""
         # FIXME: add translator credits
-        return
+
+        root = doc.getRootElement()
+        # DocBook documents can be something other than article, handle that as well in the future
+        while root and root.name != 'page':
+            root = root.next
+        if root and (root.name == 'page'):
+            root.setProp('lang', language)
+        else:
+            return
