Home » U++ Library support » RichText,QTF,RTF... » Spell checking on linux
Re: Spell checking on linux [message #26615 is a reply to message #26614] |
Sun, 16 May 2010 08:55 |
|
mirek
Messages: 13980 Registered: November 2005
|
Ultimate Member |
|
|
dolik.rce wrote on Sat, 15 May 2010 18:17 | Hi,
Here are the dictionaries, together with the original sources. Can someone put them to sf.net? Or I can do it myself, if someone grants me the rights (my sf.net account is dolik_rce).
|
Rights granted.
Quote: |
Also, I propose to make a little change to the function finding the files: Speller *sGetSpeller(int lang)
{
static ArrayMap<int, Speller> speller;
int q = speller.Find(lang);
if(q < 0) {
String pp;
String dir = ConfigFile("scd");
for(;;) {
pp << dir << ';';
String d = GetFileFolder(dir);
if(d == dir) break;
dir = d;
}
pp << spell_path << ';' << getenv("LIB") << ';' << getenv("PATH") << ';';
String path = GetFileOnPath(ToLower(LNGAsText(lang)) + ".udc", pp);
if(IsNull(path))
path = GetFileOnPath(ToLower(LNGAsText(lang)) + ".scd", pp);
if(IsNull(path)) // This is
path = GetFileOnPath(ToLower(LNGAsText(lang).Left(2)) + ".udc", pp); // added
if(IsNull(path))
return false;
FileIn in(path);
if(!in)
return false;
... It will allow the dictionaries to have just the language part of name (i.e. no country code). This way, even if the user selects country which does not have specific dictionary yet (e.g. EN-NZ) he still gets a spell checker for given language (that is en.udc for the New Zealand exmple). IMHO it is better to serve a more general dictionary than nothing.
|
OK, byt do we really have those "more general" dictionaries?
Maybe we should scan for something like "en*.udc" instead?
Mirek
|
|
|
Goto Forum:
Current Time: Wed May 15 15:26:40 CEST 2024
Total time taken to generate the page: 0.01391 seconds
|