Bug 115780 - Date fields in .docx files are shown in American English instead of the document language after loading a document
Summary: Date fields in .docx files are shown in American English instead of the docum...
Status: RESOLVED DUPLICATE of bug 99236
Alias: None
Product: LibreOffice
Classification: Unclassified
Component: Writer (show other bugs)
Version:
(earliest affected)
6.0.1.1 release
Hardware: All All
: medium normal
Assignee: Not Assigned
URL:
Whiteboard:
Keywords:
Depends on:
Blocks: DOCX-Fields
  Show dependency treegraph
 
Reported: 2018-02-16 13:22 UTC by Martijn van de Streek
Modified: 2018-02-16 15:18 UTC (History)
1 user (show)

See Also:
Crash report or crash signature:


Attachments
Document showing the problem (4.23 KB, application/vnd.openxmlformats-officedocument.wordprocessingml.document)
2018-02-16 13:26 UTC, Martijn van de Streek
Details

Note You need to log in before you can comment on or make changes to this bug.
Description Martijn van de Streek 2018-02-16 13:22:30 UTC
Description:
Contents of date fields in .docx files with a non-English "dc:language" in docProps/core.xml  get rendered in American English instead of the document language defined in that "dc:language" element.

This is not the case if they're in a paragraph with an explicitly defined language.

(neither MS Word nor LibreOffice explicitly define paragraph language if the paragraph language matches the document language)

Steps to Reproduce:
1. Create a new document
 
2. Set document language to a non-English language

3. Insert a date field in a format that "shows off" which language it's in (include the month or week day, for instance). Observe that the date is shown in the document language (which is correct!).

4. Save the document as .docx

5. Close the file

6. Open the .docx again. Observe that the date is shown in US English (which is incorrect)

Actual Results:  
Date field is (re)rendered in US English.

Expected Results:
Date field is (re)rendered in the document language.


Reproducible: Always


User Profile Reset: Yes



Additional Info:


User-Agent: Mozilla/5.0 (X11; Linux x86_64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/64.0.3282.167 Safari/537.36
Comment 1 Martijn van de Streek 2018-02-16 13:26:02 UTC
Created attachment 139945 [details]
Document showing the problem

This document has a document language (docProps/core.xml - dc:language) of "nl-NL" (Dutch).

There are 3 paragraphs: one Dutch, one French, one US/English.

On loading the document, only the French date field is shown in French; both others will be shown in English.

Adding a new date field in the Dutch paragraph will show it in Dutch until the document is saved and loaded again. After loading, it is also in English.
Comment 2 Martijn van de Streek 2018-02-16 13:59:18 UTC
I've tried this on both Linux and Windows, and it happens on both.
Comment 3 Dieter 2018-02-16 15:16:24 UTC
Duplicate of Bug 99236?
Comment 4 Martijn van de Streek 2018-02-16 15:18:49 UTC
Looks like it, yes.

*** This bug has been marked as a duplicate of bug 99236 ***