Re: enchant: How to add path with custom dictionaries?

From: Date: Fri, 22 Feb 2008 00:25:12 +0000
Subject: Re: enchant: How to add path with custom dictionaries?
References: 1  Groups: php.pecl.dev 
Request: Send a blank email to pecl-dev+get-5127@lists.php.net to get a copy of this message
HI Markus, On Fri, Feb 22, 2008 at 12:03 AM, Markus Fischer <markus@fischer.name> wrote: > Hi, > > is there a way to add a custom path to search for directories beside the > default path? > > I've a custom myspell dictionary I want to use but I'ld rather not install it > in the system path ( /usr/share/myspell/dicts ) but in a custom location (to > provide easier updates, e.g. from a www-data process). > > With pspell I was able to do this with pspell_config_data_dir, but I can't > find something similar with enchant? Enchant allows per user dll in ~/.enchant ("Application Support" for mac). These locations have the preference over the system ones. From the enchant docs (the readme in libenchant): "Enchant is also meant to be used in a multi-user environment, such as Unix. It is preferable to have both a $USER and a $GLOBAL location for both provider DLLs and for dictionaries themselves, when possible. Enchant's DLL location algorithm takes this into account, and gives preference to the $USER DLLs, when found." About the data themselves, it should work the same way. I never tried this feature for the dictionnaries (only for the dlls) so let me know how it works. I also ask Dom if he likes to have support for custom location at runtime but he rejected the request. The reason was the current implementation is flexible enough. I would actually love to be able to specify these directories at runtime. I may provide a patch and ask again if needed :) Cheers, -- Pierre http://blog.thepimp.net | http://www.libgd.org

« previous php.pecl.dev (#5127) next »