• Hello,

    after integrating WPSpell into mya application i came across some problems. I load the standard dict GERMAN and an additional one compiled out of special words for my application. In the end I add several ignorewords. I appended my init code.

    1. E.g. the words "Gruß" and "Grüße" are always treated as wrong, although I added them to my (EMIL) dictionary. When I add them to the user dictionary, it works.

    2. Some of the Ignore-Words are not recognized, the words are treated as wrong in the text.

    3. WPSpell always marks german dates, e.g. 22.05.1961, as wrong and underlines the month and year part.

    4. Why does WPSpell treat a construction of two known words bound together with a "-" as one new unknown word?

    5. I would like to control the settings of the controller by global settings read from a database. Can this be achieved? Setting options to e.g. 76 doesnt seem to work.

    5. The context Menu of WPSpell is always in english, how can I change the language?

    Perhaps this all can be solved by doing some configuration, so any halp would be very appreciated.

    Best regards,

    Michael Schumann

    Attached please find my initialization code

    if tg.Nospellcheck <> 1 then begin
    // Spellchecker
    spellController := TWPSpellController.Create(self);
    with spellController do begin
    CurrentLanguage := 1031;
    Active := true;
    // PersistencyMode := wpUseRegistry;
    LoadSetup(false);
    addFromFile(progdir + 'GERMAN.DCT');
    addFromFile(progdir + 'EMIL.DCT');
    UserDictAdd(progdir + 'USERDICT.DIC');
    // AfterCreatePopup := SpellKillUnnecessaryItems;
    OptionFlags := 76;
    suggestMode := [wpSuggestAutoOpenDictionaries,
    wpSuggestFrequentMistakes,
    wpSuggestAccents,
    wpSuggestTwoWords,
    wpSuggestFirstVariation,
    wpSuggestRotatedChar,
    wpSuggestQWERTY,
    wpSuggestSoundex];
    // Alles im Speicher
    if tg.spellCheckFile <> 1 then memoryMode := wpspellUseMemory else
    memoryMode := wpspellUseFile;
    // Wir fügen Namen und Adresse sowie die Ärzte als Ignore-Worte zu
    IgnoreWord(dmod.prsDS.FieldByName('VOR').AsString);
    IgnoreWord(dmod.prsDS.FieldByName('NACH').AsString);
    IgnoreWord(dmod.prsDS.FieldByName('ORT').AsString);
    IgnoreWord(dmod.prsDS.FieldByName('STR').AsString);
    actSpellAsYouGo.visible := true;

    // Starten und status korrekt setzen
    actSpellAsYouGoExecute(Self);
    end
    end else
    actSpellAsYouGo.visible := true;


    1. Some words a

    • Offizieller Beitrag

    Hi,

    >>1. E.g. the words "Gruß" and "Grüße" are always treated as wrong, although I added them to my (EMIL) dictionary. When I add them to the user dictionary, it works. <<

    Does your dictionary use the same language id? Is it active?

    >>2. Some of the Ignore-Words are not recognized, the words are treated as wrong in the text. <<
    I am not sure - example ?

    >>3. WPSpell always marks german dates, e.g. 22.05.1961, as wrong and underlines the month and year part. <<
    That was a little problem in the spelllink - it should skip numbers of course

    >>4. Why does WPSpell treat a construction of two known words bound together with a "-" as one new unknown word? <<
    That was a setting - it is off except you use french dictionary.

    >>5. I would like to control the settings of the controller by global settings read from a database. Can this be achieved? Setting options to e.g. 76 doesnt seem to work. <<

    The new V1.24 (from 23.11.2006) has 2 new methods fro this:
    LoadSetupFromString
    SaveSetupToString

    >>5. The context Menu of WPSpell is always in english, how can I change the language? <<

    The new V1.24 can use the TWPLanguagControl as source for language strings. Must be activated in WPSpell_INC.INC and the included XML file must be merged in. That should fix this problem.

    Kind Regards,

    Julian Ziersch

  • Thanks. Works well now.
    One open issue: I merged the localization xml file and activated the use of the languagecontroller in wpspell_inc.inc, buildt everything but the context menu is not localized. I am sure there is one step I forgot!