From: Dom Lachowicz (domlachowicz@yahoo.com)
Date: Wed Sep 24 2003 - 22:16:14 EDT
Enchant has a function called "enchant_dict_exists".
You pass in a language tag and see if your language is
supported.
Gnome-Spell code essentially has what you want. I'm
not willing to add it to enchant - it's too odd to do
properly. Espescially for libraries like aspell that
don't give you a call to enumerate their dicitonaries
or supported languages.
My suggestion is to go down the gnome-spell route if
you need such a feature.
Dom
--- Torstein Sunde <torsteinsspambox@myrealbox.com>
wrote:
> 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?
__________________________________
Do you Yahoo!?
Yahoo! SiteBuilder - Free, easy-to-use web site design software
http://sitebuilder.yahoo.com
This archive was generated by hypermail 2.1.4 : Wed Sep 24 2003 - 22:31:13 EDT