Re: Ispell

Subject: Re: Ispell
From: Andrew Dunbar (
Date: Wed Jun 13 2001 - 21:44:26 CDT

Dom Lachowicz wrote:
> Quoting Mike Nordell <>:
> > Dom Lachowicz wrote:
> > [user lang. pref's overriding sys. pref's]
> > >
> > > We actually do support this on Unix, and I figure that it's *trivial*
> > to
> > > do on Win32 or whatever your preferred platform is.
> >
> > Should this really be a _platform_ pref (as in non-XP)? Shouldn't this
> > behavior be the same for all platforms? Perhaps I'm just mixing up
> > levels of
> > abstraction?
> 6 of one type, 1/2 dozen of another... it doesn't really matter where this
> happens. Maybe it's at the wrong level. Maybe it's not. I really don't care.
> It's important that all platforms implement this functionality, and if my
> breaking your builds makes this happen, then I'll do it. I don't care *how* it
> gets done so long as it does get done.
> > Just to put the icing on the cake, would it make sense to have two
> > functions
> > "get_system_language()" and "get_user_language()"? Perhaps they should
> > be
> > defined to return a platform-dependent data type, I don't know, but the
> > names would still return the same data-of-interest that would be
> > different
> > data for different platforms? Just brainstorming... I might be
> > completely
> > wrong.
> Sure. You wouldn't need a platform-dependent type, just return a const char * or
> something with "en-US" or something like that. We can reuse the language dialog
> from inside of the preferences dialog to accomplish this.
> > That wasn't my concern at all. _How_ we do [aipx]spell is rather
> > unimportant
> > I believe. My concern was that the "default language" property of the
> > document would be sys. default, but if I with my user defaults overrides
> > it
> > a new doc would get _my_ requested locale, not the _sys_ requested
> > locale.
> So you want to grab the default language from the system.profile and not LANG or
> whatever the win32 equivalent is? Ok, that's fair enough, and I can make this
> happen very easily. This removes the whole dilemma of platform-specific code above.
> > > Please implement something like this for Win32 if at all possible.
> >
> > I'd have a look at it if we reached an agreement. I believe it's a
> > problem
> > to be solved at a higher level of abstraction. (once again I might be
> > wrong)
> If this is how you want to do things, please go ahead. I was just thinking that
> we might be a little smarter if we tried to autodetect the locale based on
> platform-specific functions/variables/etc... Your way is totally valid too.
> Maybe i'll code this up soonish. You wouldn't need 2 calls like you describe
> above, but rather just 1 call to get a preference. It's trivial.

We already do. But it's not centralized and happens to differing
in *two* places. In ap_XXXPrefs.cpp we parse locale, in
xap_XXXEncodingManger.cpp we do it again. I've coalesced them - on
- into ut_Win32Locale.cpp. Then there is also a large table of language
properties in EncodingManager which could possibly be expanded to
names of Ispell dictionaries etc.

You guys probably know all this already (: I hope it's helpful

Andrew Dunbar.


Do You Yahoo!?
Get your free address at

This archive was generated by hypermail 2b25 : Wed Jun 13 2001 - 21:41:54 CDT