Issue 91191 - List of languages should be extendable and controllable by user
Summary: List of languages should be extendable and controllable by user
Status: CONFIRMED
Alias: None
Product: General
Classification: Code
Component: ui (show other issues)
Version: OOo 2.3
Hardware: All All
: P3 Trivial (vote)
Target Milestone: ---
Assignee: AOO issues mailing list
QA Contact:
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2008-06-29 11:32 UTC by mdjr
Modified: 2014-02-10 14:23 UTC (History)
2 users (show)

See Also:
Issue Type: FEATURE
Latest Confirmation in: 4.1.0-dev
Developer Difficulty: ---


Attachments
Correct .odt file where OpenOffice will cause a loss of information. (9.01 KB, application/vnd.oasis.opendocument.text)
2014-01-29 18:52 UTC, mdjr
no flags Details

Note You need to log in before you can comment on or make changes to this issue.
Description mdjr 2008-06-29 11:32:15 UTC
In the list of languages many languages are missing (one example is issue  
#69399). In newer versions of OO the user should have the possibility to add new
languages by ISO language code more easiely and without re-compiling the code
(either by simply modifying a text/plain configuration file or using a dialog
window; the current possibility is not user-friendly).

If OpenOffice opens a file (tested it with a manually modified .odt file) that
contains unsupported languages the box in Format->Font->Language simply displays
nothing. In future versions "Unknown (xx-XX)" should be displayed instead.

The user should have the possibility to hide languages in the language list so
that they are not displayed.
Comment 1 Edwin Sharp 2014-01-29 13:13:48 UTC
Duplicate bug

*** This issue has been marked as a duplicate of issue 87255 ***
Comment 2 mdjr 2014-01-29 18:50:07 UTC
This bug has nothing to do with bug 87255!

Bug 87255 is about an easier method of switching existing languages (e.g. change the language for the whole document).

This bug is about

- a loss of data that occurs if a valid .odt document (maybe created by a later version of OpenOffice or LibreOffice) contains a language not known to OpenOffice
- the missing possibility to add own languages to OpenOffice.

The loss of data has been tested using the following release:

OpenOffice 4.0.1, AOO401m5(Build:9714), Rev. 1524958, 2013-09-20 11:40:29

LibreOffice 3.6 also has this bug.

The .odt file attached contains a paragraph in the language "quz/PE", which is not known to OpenOffice.

By just opening the document and saving it using "save as..." (no modification to the document is done) the language information is lost and the paragraph's language becomes "none".
Comment 3 mdjr 2014-01-29 18:52:06 UTC
Created attachment 82432 [details]
Correct .odt file where OpenOffice will cause a loss of information.
Comment 4 Edwin Sharp 2014-01-29 19:34:16 UTC
Thank you and sorry for misunderstanding.

Imaynataq kachkanki? Default -> [None]

AOO410m1(Build:9750)  -  Rev. 1560934
2014-01-27_04:11:25 - Rev. 1561585
Debian
Comment 5 mdjr 2014-02-10 14:23:32 UTC
The main problem seems to be the fact that OpenOffice internally uses Microsoft's integer language codes (example: 0x409 is English).

Internally OpenOffice seems to have some kind of table that looks like this:

    {0x409,"en-US","English (USA)"},
    {0x407,"de-DE","German (Germany)"},

Unfortunately the integer code of an unknown language (e.g. exam-PLE) is not known when opening a document containing this code.

To solve this OpenOffice could simply search for an unused integer ID and add an entry dynamically to the list. Example: If the ID 0x1234 is not known OpenOffice may create a temporary entry like this:

    {0x1234,"exam-PLE","unknown (exam-PLE)"}

If a Microsoft Office document containing an unknown language is opened (example: 0xABCD) an entry is created that looks like this:

    {0xABCD,"abcd-none","unknown (0xABCD)"}

The drawback of this method is that a bad language ID is stored if an OpenOffice document is converted into the Microsoft document format. A flag telling the "save routine" that only the ISO or only the integer code is valid could be added to the table.

A configuration file could contain a list of languages added by the user. The user should have the possibility to add languages by ISO ID (e.g. en-US), by integer ID (e.g. 0x409) or by both (e.g. en-US=0x409). The configuration file should also contain the user-visible name (e.g. "English (USA)") of the language.

A GUI dialog window should be there to modify this configuration file.

Example for the configuration file:

     # Language with given integer code
    Spanish (China), 0x5678
     # Language with given ISO code
    Chinese (Italy), zho-IT
     # Language with both codes given
    Italian (Spain), ita-ES, 0xABCD

This would lead to the following temporary dynamic entries:

    {0x5678,"1234-none","Spanish (China)"},
    {0x1234,"zho-IT","Chinese (Italy)"},
    {0xABCD,"ita-ES","Italian (Spain)"},