# What's New in TX Spell .NET for WPF 5.0

> TX Spell .NET for WPF 5.0 added language detection: DetectLanguageScopes, LanguageScope with its Start, Length and CultureInfo, and DetectableLanguageScopes.

- **Product:** TX Spell .NET for WPF
- **Section:** Documentation
- **Kind:** Topic
- **Path:** TX Spell .NET for WPF > What's New > Older Versions > What's New in TX Spell .NET for WPF 5.0
- **1555 words**
- **Web URL:** https://docs.textcontrol.com/tx-spell-dotnet-wpf/whats-new/older-versions/0500/
- **LLMs URL:** https://docs.textcontrol.com/tx-spell-dotnet-wpf/whats-new/older-versions/0500/llms.txt
- **LLMs-Full URL:** https://docs.textcontrol.com/tx-spell-dotnet-wpf/whats-new/older-versions/0500/llms-full.txt

---

A text without language information, such as plain text or a pasted web page, can't be checked with the right dictionaries until its languages are known. TX Spell .NET for WPF 5.0 closes that gap with language detection: it finds the languages of a text and the sections each of them covers.

Version 5.0 was released on September 10, 2014, together with TX Text Control X11 (version 21.0), as the blog article [TX Text Control X11 Released: Cross-browser Template Editing](https://www.textcontrol.com/blog/2014/09/10/tx-text-control-x11-released-cross-browser-template-editing/) announced. Language detection is its only new feature. The version before it is [Version 4.0](https://docs.textcontrol.com/tx-spell-dotnet-wpf/whats-new/older-versions/0400/llms-full.txt), the next one [Version 6.0](https://docs.textcontrol.com/tx-spell-dotnet-wpf/whats-new/older-versions/0600/llms-full.txt).

### Version 5.0 at a Glance

| Area | What is new |
|---|---|
| Language detection | [DetectLanguageScopes](https://docs.textcontrol.com/tx-spell-dotnet-wpf/reference/txtextcontrol-wpf-proofing/txspellchecker/detectlanguagescopes-method/llms-full.txt) on `TXSpellChecker` and `TXSpell` |
| Results | [LanguageScope](https://docs.textcontrol.com/tx-spell-dotnet-wpf/reference/txtextcontrol-proofing/languagescope/llms-full.txt) and [LanguageScopeCollection](https://docs.textcontrol.com/tx-spell-dotnet-wpf/reference/txtextcontrol-proofing/languagescopecollection/llms-full.txt) |
| Settings | [DetectableLanguageScopes](https://docs.textcontrol.com/tx-spell-dotnet-wpf/reference/txtextcontrol-wpf-proofing/txspellchecker/detectablelanguagescopes-property/llms-full.txt), the languages that are looked for |

### Language Detection

[DetectLanguageScopes](https://docs.textcontrol.com/tx-spell-dotnet-wpf/reference/txtextcontrol-wpf-proofing/txspellchecker/detectlanguagescopes-method/llms-full.txt) detects the languages of a string, which can hold a whole document, and fills [LanguageScopes](https://docs.textcontrol.com/tx-spell-dotnet-wpf/reference/txtextcontrol-wpf-proofing/txspellchecker/languagescopes-property/llms-full.txt) with the results. A *language scope* is a section of the text written in one language. The method has these properties:

- **More than 30 languages.** The detection recognizes more than 30 languages.
- **Short samples.** One sentence of four or more words is enough to detect its language.
- **Nested and mixed text.** Scopes can be nested, such as a phrase in brackets in another language, and bidirectional text that mixes right-to-left and left-to-right languages is split into its languages.
- **Low cost.** Detection needs few resources and returns its results quickly.

Once the languages are known, you can add the matching dictionaries or hyphenation lists. The `TXSpell` class, for code without a user interface, has the same members: [DetectLanguageScopes](https://docs.textcontrol.com/tx-spell-dotnet-wpf/reference/txtextcontrol-proofing/txspell/detectlanguagescopes-method/llms-full.txt), [LanguageScopes](https://docs.textcontrol.com/tx-spell-dotnet-wpf/reference/txtextcontrol-proofing/txspell/languagescopes-property/llms-full.txt) and [DetectableLanguageScopes](https://docs.textcontrol.com/tx-spell-dotnet-wpf/reference/txtextcontrol-proofing/txspell/detectablelanguagescopes-property/llms-full.txt).

### The Detected Scopes

`LanguageScopes` is a `LanguageScopeCollection`. Each `LanguageScope` in it describes one section of the text:

| Property | Holds |
|---|---|
| [Start](https://docs.textcontrol.com/tx-spell-dotnet-wpf/reference/txtextcontrol-proofing/languagescope/start-property/llms-full.txt) | The zero-based position of the first character of the scope |
| [Length](https://docs.textcontrol.com/tx-spell-dotnet-wpf/reference/txtextcontrol-proofing/languagescope/length-property/llms-full.txt) | The length of the scope |
| [Language](https://docs.textcontrol.com/tx-spell-dotnet-wpf/reference/txtextcontrol-proofing/languagescope/language-property/llms-full.txt) | The detected language as a `CultureInfo`, or `null` when no language was detected |
| [Index](https://docs.textcontrol.com/tx-spell-dotnet-wpf/reference/txtextcontrol-proofing/languagescope/index-property/llms-full.txt) | The position of the scope in the collection, starting at 0 |

### The Languages That Are Detected

[DetectableLanguageScopes](https://docs.textcontrol.com/tx-spell-dotnet-wpf/reference/txtextcontrol-wpf-proofing/txspellchecker/detectablelanguagescopes-property/llms-full.txt) is an array of `CultureInfo` objects: the languages that `DetectLanguageScopes` looks for. By default, it holds Arabic, German, English, Spanish, French, Portuguese and Russian, the languages among the ten most spoken native languages that TX Spell .NET supports. Set it to the languages your users write in.

[Language Detection](https://docs.textcontrol.com/tx-spell-dotnet-wpf/dictionaries/language-detection/llms-full.txt) shows the detection in TX Text Control and in code, and [Multilingual Documents and Language Scopes](https://docs.textcontrol.com/tx-spell-dotnet-wpf/dictionaries/multilingual/llms-full.txt) explains how the detected languages choose the dictionaries.

### Service Packs

The download package holds one service pack setup of version 5.0, *TX Spell .NET for WPF 5.0 SP1.exe*, and the full version setup *TX Spell .NET for WPF 5.0.exe*. Both files are dated October 28, 2014, the date of the setup files.

### New Classes, Properties, Methods and Events

The classes and members below are the ones that the What's New documentation of version 5.0 lists for TX Spell .NET for WPF. Names are relative to the `TXTextControl` namespace, and each name links to its current reference page.

#### New Classes

- [Proofing.LanguageScope](https://docs.textcontrol.com/tx-spell-dotnet-wpf/reference/txtextcontrol-proofing/languagescope/llms-full.txt)
- [Proofing.LanguageScopeCollection](https://docs.textcontrol.com/tx-spell-dotnet-wpf/reference/txtextcontrol-proofing/languagescopecollection/llms-full.txt)

#### Members by Class

| Class | Properties | Methods | Events |
|---|---|---|---|
| [Proofing.LanguageScope](https://docs.textcontrol.com/tx-spell-dotnet-wpf/reference/txtextcontrol-proofing/languagescope/llms-full.txt) | [Index](https://docs.textcontrol.com/tx-spell-dotnet-wpf/reference/txtextcontrol-proofing/languagescope/index-property/llms-full.txt), [Language](https://docs.textcontrol.com/tx-spell-dotnet-wpf/reference/txtextcontrol-proofing/languagescope/language-property/llms-full.txt), [Length](https://docs.textcontrol.com/tx-spell-dotnet-wpf/reference/txtextcontrol-proofing/languagescope/length-property/llms-full.txt), [Start](https://docs.textcontrol.com/tx-spell-dotnet-wpf/reference/txtextcontrol-proofing/languagescope/start-property/llms-full.txt) |  |  |
| [Proofing.LanguageScopeCollection](https://docs.textcontrol.com/tx-spell-dotnet-wpf/reference/txtextcontrol-proofing/languagescopecollection/llms-full.txt) | [Item](https://docs.textcontrol.com/tx-spell-dotnet-wpf/reference/txtextcontrol-proofing/languagescopecollection/item-method/llms-full.txt) | [GetItem](https://docs.textcontrol.com/tx-spell-dotnet-wpf/reference/txtextcontrol-proofing/languagescopecollection/getitem-method/llms-full.txt) |  |
| [Proofing.TXSpell](https://docs.textcontrol.com/tx-spell-dotnet-wpf/reference/txtextcontrol-proofing/txspell/llms-full.txt) | [DetectableLanguageScopes](https://docs.textcontrol.com/tx-spell-dotnet-wpf/reference/txtextcontrol-proofing/txspell/detectablelanguagescopes-property/llms-full.txt), [LanguageScopes](https://docs.textcontrol.com/tx-spell-dotnet-wpf/reference/txtextcontrol-proofing/txspell/languagescopes-property/llms-full.txt) | [DetectLanguageScopes](https://docs.textcontrol.com/tx-spell-dotnet-wpf/reference/txtextcontrol-proofing/txspell/detectlanguagescopes-method/llms-full.txt) |  |
| [WPF.Proofing.TXSpellChecker](https://docs.textcontrol.com/tx-spell-dotnet-wpf/reference/txtextcontrol-wpf-proofing/txspellchecker/llms-full.txt) | [DetectableLanguageScopes](https://docs.textcontrol.com/tx-spell-dotnet-wpf/reference/txtextcontrol-wpf-proofing/txspellchecker/detectablelanguagescopes-property/llms-full.txt), [LanguageScopes](https://docs.textcontrol.com/tx-spell-dotnet-wpf/reference/txtextcontrol-wpf-proofing/txspellchecker/languagescopes-property/llms-full.txt) | [DetectLanguageScopes](https://docs.textcontrol.com/tx-spell-dotnet-wpf/reference/txtextcontrol-wpf-proofing/txspellchecker/detectlanguagescopes-method/llms-full.txt) |  |

### Next Steps

- [Version 6.0](https://docs.textcontrol.com/tx-spell-dotnet-wpf/whats-new/older-versions/0600/llms-full.txt): the `SpellingCorrectionUIProvider` for correction interfaces of your own.
- [Version 4.0](https://docs.textcontrol.com/tx-spell-dotnet-wpf/whats-new/older-versions/0400/llms-full.txt): hyphenation and right-to-left languages.
- [Language Detection](https://docs.textcontrol.com/tx-spell-dotnet-wpf/dictionaries/language-detection/llms-full.txt): detect languages with today's version.

---

## Nearby

- **Previous:** [What's New in TX Spell .NET for WPF 6.0](https://docs.textcontrol.com/tx-spell-dotnet-wpf/whats-new/older-versions/0600/llms-full.txt)
- **Next:** [What's New in TX Spell .NET for WPF 4.0](https://docs.textcontrol.com/tx-spell-dotnet-wpf/whats-new/older-versions/0400/llms-full.txt)
