# Dictionaries Not Found

> Fix missing language data in WPF applications: folder errors, rejected hyphenation and synonym lists, wrong languages, language detection and user dictionaries.

- **Product:** TX Spell .NET for WPF
- **Section:** Documentation
- **Kind:** Topic
- **Path:** TX Spell .NET for WPF > Troubleshooting > Dictionaries Not Found
- **1596 words**
- **Web URL:** https://docs.textcontrol.com/tx-spell-dotnet-wpf/troubleshooting/dictionaries/
- **LLMs URL:** https://docs.textcontrol.com/tx-spell-dotnet-wpf/troubleshooting/dictionaries/llms.txt
- **LLMs-Full URL:** https://docs.textcontrol.com/tx-spell-dotnet-wpf/troubleshooting/dictionaries/llms-full.txt

---

TX Spell .NET reads its language data from four folders: *Dictionaries* for spell checking, *HyphenationLists* for hyphenation, *SynonymLists* for synonyms and *LanguageRecognition* for detecting the language of a text. When a folder or a file can't be found, TX Spell .NET reports it, or checks text in another language than you expect. The messages below are those of TX Spell .NET 11.0. [Installing Dictionaries and Language Data](https://docs.textcontrol.com/tx-spell-dotnet-wpf/installation/language-data/llms-full.txt) explains where the data belongs.

### TX Spell .NET Doesn't Find the Dictionaries Folder

An exception reports that a folder of the language data is missing, with a message such as:

```text
Neither a Dictionaries directory was found inside the application's executable program file folder, nor a valid TXSpell registry key referring to the corresponding default directory could be detected.
```

The message exists for each folder, and some variants add the path that was searched. A shorter message names the folder only:

```text
The default 'Dictionaries' directory does not exist.
```

By default, TX Spell .NET looks for each folder next to the application's executable and, on a development machine, below the *\\Assembly* folder of the installation; [Where the Spell Checker Looks](https://docs.textcontrol.com/tx-spell-dotnet-wpf/installation/language-data/#where-the-spell-checker-looks) explains the default. The message means that neither place has the folder.

1. In a .NET 8 or later project, install the TX Spell .NET package. It copies the four folders into the output directory when you build.
2. Without the package, copy the folders *Dictionaries*, *HyphenationLists*, *LanguageRecognition* and *SynonymLists* from the *\\Assembly* folder of the installation into the folder of the executable.
3. To keep the language data elsewhere, set the folder properties of [TXSpellChecker](https://docs.textcontrol.com/tx-spell-dotnet-wpf/reference/txtextcontrol-wpf-proofing/txspellchecker/llms-full.txt) or [TXSpell](https://docs.textcontrol.com/tx-spell-dotnet-wpf/reference/txtextcontrol-proofing/txspell/llms-full.txt) to the folders, as the same page shows.

### A Folder You Set Doesn't Exist

An exception reports a path that doesn't exist:

```text
The specified path refers to a directory that does not exist:
```

The message is followed by the path. A folder property is set to a folder that isn't there.

1. Check the path you set, and create the folder or correct the path.
2. Copy the language data into the folder.

### A Dictionary File Is Rejected

Adding a [HyphenationList](https://docs.textcontrol.com/tx-spell-dotnet-wpf/reference/txtextcontrol-proofing/hyphenationlist/llms-full.txt) to `HyphenationLists` or a [SynonymList](https://docs.textcontrol.com/tx-spell-dotnet-wpf/reference/txtextcontrol-proofing/synonymlist/llms-full.txt) to `SynonymLists` throws an `ArgumentException`, with the message "File does not exist:" and the path, or "Dictionary type is not valid.". The constructors don't check the file: [Add](https://docs.textcontrol.com/tx-spell-dotnet-wpf/reference/txtextcontrol-proofing/hyphenationlistcollection/add-method/llms-full.txt) does. An [OpenOfficeDictionary](https://docs.textcontrol.com/tx-spell-dotnet-wpf/reference/txtextcontrol-proofing/openofficedictionary/llms-full.txt) or a [UserDictionary](https://docs.textcontrol.com/tx-spell-dotnet-wpf/reference/txtextcontrol-proofing/userdictionary/llms-full.txt) needs a file that follows a pattern as well.

The file doesn't exist, or its name doesn't follow the pattern of its kind. A file name without a path is looked for in the default folder of its kind.

| Class | The file name |
|---|---|
| `OpenOfficeDictionary` | Ends with *.dic* or *.aff*; the file is looked for in the *Dictionaries* folder |
| `UserDictionary` | Ends with *.txd*; the file must be a valid user dictionary |
| `HyphenationList` | Starts with *hyph\_* and ends with *.dic*; the file is looked for in the *HyphenationLists* folder |
| `SynonymList` | Starts with *th\_* or *thes\_* and ends with *.dat* or *.idx*; the file is looked for in the *SynonymLists* folder |

1. Check that the file name follows the pattern of the table.
2. Pass the full path of the file, or put the file into the default folder of its kind.

### Text Is Checked in the Wrong Language

Words of your language are marked as misspelled, or English is used although the application runs in another language.

The packages and the setup contain the language data for US English only. With the default value `"(Auto)"` of the [Language](https://docs.textcontrol.com/tx-spell-dotnet-wpf/reference/txtextcontrol-wpf-proofing/txspellchecker/language-property/llms-full.txt) property, TX Spell .NET falls back to US English when the folder has no dictionary of the application's language; [Which Dictionary Is Loaded First](https://docs.textcontrol.com/tx-spell-dotnet-wpf/dictionaries/managing/#which-dictionary-is-loaded-first) gives the order.

1. Install the dictionaries of your language, as [Install a Dictionary](https://docs.textcontrol.com/tx-spell-dotnet-wpf/dictionaries/hunspell/#install-a-dictionary) describes.
2. Leave `Language` at `"(Auto)"`, or set it to the file name of the dictionary, such as `de_DE_frami.dic`.

### Words Aren't Hyphenated or No Synonyms Are Found

Hyphenation doesn't work, or the thesaurus finds no synonyms, while spell checking works.

Hyphenation and synonyms have their own files in the folders *HyphenationLists* and *SynonymLists*, and not every archive contains a hyphenation list or a synonym list. When the folder has no list for the language, [HyphenationLanguage](https://docs.textcontrol.com/tx-spell-dotnet-wpf/reference/txtextcontrol-wpf-proofing/txspellchecker/hyphenationlanguage-property/llms-full.txt) is `"(none)"`; [SynonymLanguage](https://docs.textcontrol.com/tx-spell-dotnet-wpf/reference/txtextcontrol-wpf-proofing/txspellchecker/synonymlanguage-property/llms-full.txt) falls back to a list of another language.

1. Copy the hyphenation list, *hyph\_* followed by the language and *.dic*, into *HyphenationLists*.
2. Copy the synonym list, the *.dat* and *.idx* files starting with *th\_* or *thes\_*, into *SynonymLists*.
3. Check `HyphenationLanguage` and `SynonymLanguage` after the application has started.

[How a List Is Chosen](https://docs.textcontrol.com/tx-spell-dotnet-wpf/hyphenation/lists/#how-a-list-is-chosen) for hyphenation and [How a List Is Chosen](https://docs.textcontrol.com/tx-spell-dotnet-wpf/synonyms/lists/#how-a-list-is-chosen) for synonyms describe the defaults.

### The Language of a Text Isn't Detected

Detecting the languages of a text with `DetectLanguageScopes` fails or finds no languages.

Language detection needs the file *languageRecognition.resources* in the folder *LanguageRecognition*.

1. Deploy the folder *LanguageRecognition* with the file, as the first section describes.
2. Check [LanguageRecognitionDirectoryPath](https://docs.textcontrol.com/tx-spell-dotnet-wpf/reference/txtextcontrol-wpf-proofing/txspellchecker/languagerecognitiondirectorypath-property/llms-full.txt) if you keep the folder elsewhere.

See [Language Detection](https://docs.textcontrol.com/tx-spell-dotnet-wpf/dictionaries/language-detection/llms-full.txt).

### A User Dictionary Isn't Saved

[UserDictionary.Save](https://docs.textcontrol.com/tx-spell-dotnet-wpf/reference/txtextcontrol-proofing/userdictionary/save-method/llms-full.txt) returns `false`, or the words users added are gone after a restart.

`Save` has no effect if the path doesn't end with *.txd*. It returns `false` when the dictionary couldn't be saved. A file name without a path is saved in the default dictionaries folder, which users may not be allowed to write to.

1. Save to a path that ends with *.txd*, in a folder the user can write to.
2. Check the return value of `Save`.

[User Dictionaries](https://docs.textcontrol.com/tx-spell-dotnet-wpf/dictionaries/user/llms-full.txt) describes them.

### Related Pages

- [Installing Dictionaries and Language Data](https://docs.textcontrol.com/tx-spell-dotnet-wpf/installation/language-data/llms-full.txt): where the language data belongs.
- [Loading and Managing Dictionaries](https://docs.textcontrol.com/tx-spell-dotnet-wpf/dictionaries/managing/llms-full.txt): dictionaries in code.
- [Deployment](https://docs.textcontrol.com/tx-spell-dotnet-wpf/troubleshooting/deployment/llms-full.txt): the language data on the machines of your users.

---

## Nearby

- **Previous:** [Licensing](https://docs.textcontrol.com/tx-spell-dotnet-wpf/troubleshooting/licensing/llms-full.txt)
- **Next:** [Deployment](https://docs.textcontrol.com/tx-spell-dotnet-wpf/troubleshooting/deployment/llms-full.txt)
