Re: Enchant dict vs provider

From: Dominic Lachowicz <domlachowicz_at_gmail.com>
Date: Thu Jun 12 2008 - 20:44:24 CEST

Hi Enrico,

Enchant has preferences. The default set of preferences is here and
gets installed to $prefix/share/enchant (I think):

http://www.abisource.com/viewvc/enchant/trunk/data/enchant.ordering?view=markup

The only line relevant from that file (for you) is:

*:myspell,aspell,ispell

The format is "language:provider1,provider2,...". "*" is the special
"apply this rule to all languages unless it gets explicitly
overridden." Since "de" isn't specified, the "*" rule will trigger and
enchant will try myspell first, then aspell, then ispell. If nothing's
found, it will try any other providers until 1 returns a dictionary or
they all fail.

You can create a ~/.enchant/enchant.ordering file with:

de:aspell

If you prefer Aspell. You can programmatically override these by
calling something like:

enchant_broker_set_ordering(broker, "de", "ispell,aspell,myspell");

Hope that helps,
Dom

On Thu, Jun 12, 2008 at 2:28 PM, Enrico Tröger <enrico.troeger@uvena.de> wrote:
> Hi,
>
> I'm currently writing a spellcheck plugin for Geany (a little IDE).
>
> With enchant_broker_list_dicts() I get listed different dictionaries
> from different providers, for instance. de, de_AT and de_DE from
> aspell and from myspell. This is cool.
>
> But when I create a EnchantDict object with enchant_broker_request_dict
> (), I specify only a language tag.
> The question is, how does Enchant choose the dictionary?
> Does it use the first matching dict from the first provider who has
> this dict? Or does it automatically use all dictionaries matching the
> name from all providers which have this dict?
>
> I guess it uses the first dict found.
> If so, can I choose a provider before?
>
> Besides this, Enchant is great!
> Thanks!
>
> Regards,
> Enrico
>
> --
> Get my GPG key from http://www.uvena.de/pub.asc
>

-- 
Counting bodies like sheep to the rhythm of the war drums.
Received on Thu Jun 12 20:44:47 2008

This archive was generated by hypermail 2.1.8 : Thu Jun 12 2008 - 20:44:47 CEST