commit d85969b8b870c6b81c515b4885588e99da1110aa
Author: Thibaut Cuvelier <tcuvel...@lyx.org>
Date:   Fri Dec 23 02:12:05 2022 +0100

    LyXHTML: give the language in the root tag.
---
 src/Buffer.cpp |    6 ++----
 1 files changed, 2 insertions(+), 4 deletions(-)

diff --git a/src/Buffer.cpp b/src/Buffer.cpp
index 94f4dd4..c7e479a 100644
--- a/src/Buffer.cpp
+++ b/src/Buffer.cpp
@@ -2173,8 +2173,7 @@ Buffer::ExportStatus 
Buffer::writeDocBookSource(odocstream & os,
                }
 
                // Directly output the root tag, based on the current type of 
document.
-               string languageCode = params().language->code();
-               string params = "xml:lang=\"" + languageCode + '"'
+               string params = "xml:lang=\"" + params().language->code() + '"'
                                                + " 
xmlns=\"http://docbook.org/ns/docbook\"";
                                                + " 
xmlns:xlink=\"http://www.w3.org/1999/xlink\"";
                                                + mathmlNamespace
@@ -2241,8 +2240,7 @@ Buffer::ExportStatus 
Buffer::writeLyXHTMLSource(odocstream & os,
        if (output_preamble) {
                os << "<?xml version=\"1.0\" encoding=\"UTF-8\"?>\n"
                   << "<!DOCTYPE html PUBLIC \"-//W3C//DTD XHTML 1.1 plus 
MathML 2.0//EN\" \"http://www.w3.org/Math/DTD/mathml2/xhtml-math11-f.dtd\";>\n"
-                  // FIXME Language should be set properly.
-                  << "<html xmlns=\"http://www.w3.org/1999/xhtml\";>\n"
+                  << "<html xmlns=\"http://www.w3.org/1999/xhtml\"; lang=\"" << 
from_ascii(params().language->code()) << "\">\n"
                   << "<head>\n"
                   << "<meta name=\"GENERATOR\" content=\"" << PACKAGE_STRING 
<< "\" />\n"
                   // FIXME Presumably need to set this right
-- 
lyx-cvs mailing list
lyx-cvs@lists.lyx.org
http://lists.lyx.org/mailman/listinfo/lyx-cvs

Reply via email to