Issue 32939 - Pls. determin also the CJK and CTL document language and store in the configuration
Summary: Pls. determin also the CJK and CTL document language and store in the configu...
Status: CLOSED FIXED
Alias: None
Product: General
Classification: Code
Component: code (show other issues)
Version: 680m50
Hardware: All All
: P3 Trivial (vote)
Target Milestone: OOo 2.0.1
Assignee: ulf.stroehler
QA Contact: issues@framework
URL:
Keywords:
: 45138 46190 49650 (view as issue list)
Depends on:
Blocks: 42730
  Show dependency tree
 
Reported: 2004-08-13 11:07 UTC by ulf.stroehler
Modified: 2005-12-11 18:56 UTC (History)
6 users (show)

See Also:
Issue Type: DEFECT
Latest Confirmation in: ---
Developer Difficulty: ---


Attachments

Note You need to log in before you can comment on or make changes to this issue.
Description ulf.stroehler 2004-08-13 11:07:25 UTC
As seen together in a CJK or CTL locale the respective support is correctly
enabled in OO.o but the corresponding document language isn't set. (Western
document language is set correctly.) 

This leads to improper default fonts in OO.o Writer for the respective script type.

Pls. consult OS where and what he expects in the configuration for the CJK and
CTL default fonts in the Writer.
Comment 1 lo 2004-10-12 13:34:14 UTC
accepted
Comment 2 lo 2004-11-04 10:47:16 UTC
it might be usefull, to think about implementing a behaviour like the one, which
is used for the UI language. I.e. when available, CTL/CJK (/Western) document
language should be set to 'Default' which would imply the system setting to be
selected at startup. If an explixit selection was made, that would override the
system setting.
Eike, Falko, what are your thoughts on this?
Comment 3 ooo 2004-11-04 11:29:39 UTC
Sounds reasonable. At least that at the moment I can't think of a scenario why
we should not do it. Question remains: what system setting would we take for a
default? It doesn't have to be necessarily the same as the one used for
selecting the UI language. In fact it should more correspond with the locale
setting, I think. Other thoughts?

Eike
Comment 4 lo 2004-12-08 10:25:36 UTC
I propose to solce this in the following way:

- Office Starts
- Selected UI Language is checked.
- If UI Language is Western Language:
  - check whether default language for western documents is set
  - if not set -> set it according to UI language
  - if set, leave it as is
- If UI Language is CTL Language
  - As above, but for CTK instead of western
- If CJK, as above but for CJK

Ratinale is to not touch the setting, if the user has selected something. If the
user changes the UI language a second time, this would not be reflected in the
document language, because it was already set the previous time. I would think
this is the right way to go, since both settings are in the same dialog, so the
user would not expect his default document language to change when he only
changed the UI language.

Question, how do I know, if a language is western, CTL or CJK, does every
language/locale fall into one of these classes? (I can always use a list of
known CJK and CTL languages, but maybe there is a better way) How do I find out
about available/installed document languages, so I don't set it to something
thats not installed?
Comment 5 falko.tesch 2004-12-08 10:31:19 UTC
FT-lo: Your suggestion sounds resonable. I, too, cannot think of a situation
that is not covered here (as long as we leave "old" documents intact).
Regarding your last question:
Every language is uniquely identified as a Western *or* a CTL *or* CJK, there
are no doubles. 
How you can determine this on a technical base I cannot say but I know that we
have a list of those in OO.org existing.  
Comment 6 ulf.stroehler 2004-12-08 10:35:40 UTC
Lars, regarding your question, how to classify a locale wether it is latin,CJK
or CTL probably Eike and Karl could provide the insight. CC-ing Karl.
Comment 7 ooo 2004-12-08 15:00:41 UTC
Just for completeness, already clarified offline with Lars:
#include <svtools/languageoptions.hxx>
and use
static sal_uInt16 SvtLanguageOptions::GetScriptTypeOfLanguage( sal_uInt16 nLang );
where sal_uInt16 nLang is a LanguageType value from tools/inc/lang.hxx and the
return value is one of {SCRIPTTYPE_LATIN,SCRIPTTYPE_ASIAN,SCRIPTTYPE_COMPLEX}

Eike
Comment 8 lo 2004-12-09 13:37:38 UTC
fixed
Comment 9 lo 2004-12-17 18:15:55 UTC
reopen
Comment 10 lo 2004-12-17 18:16:19 UTC
please verify
Comment 11 lo 2004-12-17 18:16:40 UTC
fixed
Comment 12 ulf.stroehler 2005-02-04 16:52:45 UTC
Hmm, the current implementation does not completely fullfill my request:

Making the document language dependent on the UI language results in still no
document language set, if the respective language resource isnt't
installed/available. And that's a problem for the reasons pointed out earlier.

EXAMPLE:
========

You have a CJK or western OfficeMulti installed.
Your system locale is CTL e.g. hebrew

Office starts with english GUI. Fine!
"Enhanced language support" for CTL is enable in /Tools/Options/Language
Settings/Languages. Also nice!

But the CTL language is still set to "[NONE]". 

That's a problem and exactly what I'd tried to address with this issue. Sorry if
I have not been clear enough in this matter.
Comment 13 ulf.stroehler 2005-02-04 16:54:29 UTC
Reassigning.
Comment 14 Mathias_Bauer 2005-02-25 10:47:09 UTC
I talked with FT and US: nobody had a problem with retargetting to 2.0.1
Comment 15 ulf.stroehler 2005-03-16 14:51:42 UTC
*** Issue 45138 has been marked as a duplicate of this issue. ***
Comment 16 jjc 2005-04-25 14:06:14 UTC
I think it's a bad idea to try to determine the document language from the UI
language.  At least in Thailand, there are lots of users who like to have the UI
in English, but still want a default CTL document language of Thai.

Note that on Windows there are two independent locales:

- the user locale (in XP, set on the "Regional Options" tab of "Regional and
Language Settings"); this is per-user

- the system locale (in XP, set in the "Language for non-Unicode programs" box
on the "Advanced" tab of "Regional and Language Settings"); this is system wide
not per-user

It's very common for machines in Thailand for the user locale to be US (at least
from my not very representative survey). Thai users are often quite happy
running with a US user locale: it doesn't bother them enough that they want to
change it. They will also almost always have Thai as their system locale: the
main reason for this is that there's an undocumented Windows feature that making
Thai the system locale enables the use of grave accent to switch input
languages; this was the default behaviour of Thai Windows 95/98/Me, and is
generally much preferred to Alt/Ctrl+Shift.

To determine the default CTL language I would suggest the following algorithm:

- get the user locale; if it's a complex script language, use that; otherwise

- get the system locale; if it's a complex script language, use that.
Comment 17 lo 2005-06-07 11:18:27 UTC
fixed on lo8.
The default document locale is now set accoring to what is reported as the
system locale from org.openoffice.System/L10N/Locale (not UILocale)
The language is only set, if there is no default language for the selected
script-type already set, which means changing the system locale once the locale
has been set for some script type won't change it again. 
A 'Use System Default' setting would be required in the Language dialog, this
could be done in some later version. (Whoever feels the need for that should
write an issue)
Comment 18 lo 2005-07-11 09:31:16 UTC
*** Issue 46190 has been marked as a duplicate of this issue. ***
Comment 19 lo 2005-10-20 11:08:26 UTC
please verify on CWS lo8

re-open issue and reassign to us@openoffice.org
Comment 20 lo 2005-10-20 11:08:58 UTC
reassign to us@openoffice.org
Comment 21 lo 2005-10-20 11:09:24 UTC
reset resolution to FIXED
Comment 22 ulf.stroehler 2005-10-21 14:46:20 UTC
verified in cws 'lo8'.
Comment 23 ulf.stroehler 2005-11-28 10:47:31 UTC
verified in m142.
Comment 24 lohmaier 2005-12-11 18:56:17 UTC
*** Issue 49650 has been marked as a duplicate of this issue. ***