Apache OpenOffice (AOO) Bugzilla – Issue 32939
Pls. determin also the CJK and CTL document language and store in the configuration
Last modified: 2005-12-11 18:56:17 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.
accepted
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?
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
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?
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.
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.
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
fixed
reopen
please verify
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.
Reassigning.
I talked with FT and US: nobody had a problem with retargetting to 2.0.1
*** Issue 45138 has been marked as a duplicate of this issue. ***
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.
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)
*** Issue 46190 has been marked as a duplicate of this issue. ***
please verify on CWS lo8 re-open issue and reassign to us@openoffice.org
reassign to us@openoffice.org
reset resolution to FIXED
verified in cws 'lo8'.
verified in m142.
*** Issue 49650 has been marked as a duplicate of this issue. ***