Bug 39937 - Missing dc:language metadata element for default language
Summary: Missing dc:language metadata element for default language
Status: NEW
Alias: None
Product: LibreOffice
Classification: Unclassified
Component: Linguistic (show other bugs)
Version: 3.3.1 release
Hardware: Other All
: medium enhancement
Assignee: Not Assigned
QA Contact:
URL:
Whiteboard:
Keywords:
Depends on:
Blocks: 39795
  Show dependency treegraph
 
Reported: 2011-08-08 10:31 UTC by Christophe Strobbe
Modified: 2014-02-23 21:59 UTC (History)
0 users

See Also:
i915 platform:
i915 features:


Attachments

Description Christophe Strobbe 2011-08-08 10:31:39 UTC
The meta.xml file inside ODF files can be used for identifying a document's default language (from the ODF 1.2 specification, section 4.3.2.15: "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.
Comment 1 Björn Michaelsen 2011-12-23 12:21:28 UTC
[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:
http://wiki.documentfoundation.org/QA/BugHunting_Session_3.5.0.-1

more detail on this bulk operation: http://nabble.documentfoundation.org/RFC-Operation-Spamzilla-tp3607474p3607474.html
Comment 2 Christophe Strobbe 2012-01-27 04:16:53 UTC
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.
Comment 3 Julien Nabet 2014-02-23 21:59:16 UTC
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.


Use of freedesktop.org services, including Bugzilla, is subject to our Code of Conduct. How we collect and use information is described in our Privacy Policy.