The meta.xml file inside ODF files can be used for identifying a document's default language (from the ODF 1.2 specification, section 184.108.40.206: "The <dc:language> element specifies the default language of a document."
LibreOffice 3.3.1 Writer does not output this element.
Please output dc:language for the default language, i.e. the language used for the largest share in the document. Note that ODF knows three types of languages: Western language, Asian language and CTL language. In meta.xml, these language are represented by the attributes
* fo:language and fo:country for Western languages,
* style:language-asian and style:country-asian for Asian languages, and
* style:language-complex and style:country-complex for CTL (complex text layout) languages.
(See Tools > Options > Language Settings > Languages in LibreOffice.)
When any of these languages is "zxx" (i.e. "[None]" in the Options dialog), that language should not be output. If more than one language is really in use (i.e. its use can be detected with the language guesser function, as opposed to the language merely being enabled in the Options dialog), it seems best to output a dc:language element per language. The data type for dc:language is the same as for xml:lang (see the ODF 1.2 specification section 18.3.16: "The language datatype is the same as the [xmlschema-2] language datatype, except that its value range is not restricted to values of [RFC3066], but follows the syntax of the xml:lang attribute. See §2.12 of [XML1.0].".)
The XSLT for the XHTML export filter assumes that a dc:language element is present, so Bug 39795 - Writer XHTML export loses language information [accessibility] - depends on this issue.
[This is an automated message.]
This bug was filed before the changes to Bugzilla on 2011-10-16. Thus it
started right out as NEW without ever being explicitly confirmed. The bug is
changed to state NEEDINFO for this reason. To move this bug from NEEDINFO back
to NEW please check if the bug still persists with the 3.5.0 beta1 or beta2 prereleases.
Details on how to test the 3.5.0 beta1 can be found at:
more detail on this bulk operation: http://nabble.documentfoundation.org/RFC-Operation-Spamzilla-tp3607474p3607474.html
Version info was previously LibO 3.3.1. I confirm that this bug still applies to LibreOffice 3.5.0 RC1: in newly created files (with Writer or Impress) meta.xml does not contain a dc:language element. Changing the status from NEEDINFO to NEW.
Put it back to 3.3.1 since version must contain the oldest version of LO when the bug appeared.
For the record, I can still reproduce this with master sources (future 4.3.0) updated today.