diff options
author | Svante Schubert <svante.schubert@gmail.com> | 2020-08-24 17:14:42 +0200 |
---|---|---|
committer | Michael Stahl <michael.stahl@allotropia.de> | 2021-03-02 13:22:03 +0100 |
commit | 795f89c7d1e4ade6cdaa12cb4ba0857ae3b1e02e (patch) | |
tree | f69e7ddf723c2fae405f31a8d7c8bc0fbd4e7c8d /filter | |
parent | c920bf759080159a323cc3bb58f275c020913223 (diff) |
HTML XSLT: Adding default language for accessiblity
Change-Id: I1e608239bd2524f0d2372871f465d926ea24ba42
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/111614
Tested-by: Jenkins
Reviewed-by: Michael Stahl <michael.stahl@allotropia.de>
Diffstat (limited to 'filter')
-rw-r--r-- | filter/source/xslt/odf2xhtml/export/xhtml/opendoc2xhtml.xsl | 11 |
1 files changed, 11 insertions, 0 deletions
diff --git a/filter/source/xslt/odf2xhtml/export/xhtml/opendoc2xhtml.xsl b/filter/source/xslt/odf2xhtml/export/xhtml/opendoc2xhtml.xsl index e81b93ce4235..196b85eae859 100644 --- a/filter/source/xslt/odf2xhtml/export/xhtml/opendoc2xhtml.xsl +++ b/filter/source/xslt/odf2xhtml/export/xhtml/opendoc2xhtml.xsl @@ -145,7 +145,18 @@ <xsl:template name="start-main"> <xsl:param name="globalData" /> + <xsl:variable name="lang"> + <xsl:choose> + <xsl:when test="$globalData/meta-file/*/office:meta/dc:language"> + <xsl:value-of select="$globalData/meta-file/*/office:meta/dc:language" /> + </xsl:when> + <xsl:otherwise>en-US</xsl:otherwise> + </xsl:choose> + </xsl:variable> + <xsl:element name="html"> + + <xsl:attribute name="lang"><xsl:value-of select="$lang"/></xsl:attribute> <xsl:comment>This file was converted to xhtml by LibreOffice - see https://cgit.freedesktop.org/libreoffice/core/tree/filter/source/xslt for the code.</xsl:comment> <xsl:call-template name='create-header'> <xsl:with-param name="globalData" select="$globalData" /> |