Re: Ispell


Subject: Re: Ispell
From: Andrew Dunbar (hippietrail@yahoo.com)
Date: Wed Jun 13 2001 - 21:33:28 CDT


Mike Nordell wrote:
>
> 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?
>
> > On Unix, we getenv("LANG"), which can be en-US, de-DE, etc... My impl
> probably
> > isn't the best, but it sure does work. See src/wp/ap/unix/ap_UnixFrame.cpp
> > around line 130.
>
> 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.

Maybe you want to look at my ut_locale.cpp I made for Windows. I'm sure
this concept can be expanded in an XP way. Also, some OSes also have a
"gui language" - I think Windows or at least NT has this.

> > Since we spell-check based on our "lang" property now in *both* the ispell
> and
> > pspell builds, setting "lang" to sv-SE will give you the desired effect.
>
> 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.
>
> > 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)

My 2 cents is that all language-related systems should have a degree of
centralization. I was looking at doing "smart fallbacks" for Stringsets
a few days ago where we would use "en-GB" if we can't find "en-AU" or
"fr-FR" if we can't find "fr-XX" etc. I think spelling would also
benefit
from this. It would be nice to have a central bit of code that chose
the
closest supported/available language for anything dependent on language.

Andrew Dunbar.

-- 
http://linguaphile.sourceforge.net

_________________________________________________________
Do You Yahoo!?
Get your free @yahoo.com address at http://mail.yahoo.com




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