Enchant - list available dictionaries

From: Torstein Sunde (torsteinsspambox@myrealbox.com)
Date: Wed Sep 24 2003 - 21:53:42 EDT

  • Next message: Dom Lachowicz: "Re: Enchant - list available dictionaries"

    I couldn't find a function in the Enchant code that creates a list of
    available dictionaries. Maybe I've overlooked something, otherwise I'll
    suggest such a function.

    This would mean that it wouldn't be necessary for each application to
    either let the user type a tag or query enchant for all possible
    languages. A list of possible languages to ask for, like the one in
    Gnome-spell, may become outdated; it's better that only Enchant handles
    this. (Even with the Enchant patch, there are dictionaries for aspell
    that aren't listed in Gnome-spell: cy and ro.)

    It would also make it more attractive to use Enchant in apps that now
    only use aspell, since the latter provides such a function, AFAIK.
    (Used in e.g. Sylpheed-Claws.)

    For each language, the following should be listed, if available:
    - Language tag ("en_UK", "de_DE", "es_ES", ...); filename minus
      extension if unavailable ("british", "deutsch", ...)
    - Local name of language ("UK English", "Deutsch", "Espaņol", ...);
      English name if local name unavailable.
    - Encoding of local name (iso-8859-*, UTF-8, ...)

    I believe it's sufficient that applications display the local names of
    the languages. This also reduces the need for translation.

    If a speller (aspell?) provides a function that lists the available
    dictionaries, that function should be used. Otherwise the dictionary
    directory should be scanned. In the latter case, it's better that
    languages unknown to Enchant (e.g. not listed in ispell_map[] of
    ispell_checker.cpp) are shown with filenames as tags instead of not
    being listed at all.

    Comments?



    This archive was generated by hypermail 2.1.4 : Wed Sep 24 2003 - 22:00:45 EDT