The requested page is not available for the requested platform. You are viewing the content for .NET Framework 4.5.2+ platform.
.NET Framework 4.5.2+
.NET Framework 4.5.2+
.NET Standard 2.0+

CharacterPropertiesBase.Language Property

Specifies the spell check language.

Namespace: DevExpress.XtraRichEdit.API.Native

Assembly: DevExpress.RichEdit.v19.1.Core.dll

Declaration

LangInfo? Language { get; set; }
Property Language As LangInfo?
LangInfo? Language { get; set; }
Property Language As LangInfo?

Property Value

Type Description
Nullable<DevExpress.XtraRichEdit.Model.LangInfo>

A nullable Nullable<T><DevExpress.XtraRichEdit.Model.LangInfo,> value.

Property Value

Type Description
Nullable<DevExpress.XtraRichEdit.Model.LangInfo>

A nullable Nullable<T><DevExpress.XtraRichEdit.Model.LangInfo,> value.

Remarks

The LangInfo structure specifies languages used to check spelling and grammar (if requested) when processing the text run. The text run can contain text of three different cultures. The LangInfo has the following constructor:


public LangInfo(CultureInfo latin, CultureInfo bidi, CultureInfo eastAsia)

The SpellChecker checks the text's spelling according to the specified parameters.

The code sample below specifies the selected text's language:


DocumentRange targetRange = richEditControl1.Document.Paragraphs[2].Range;
CharacterProperties cp = richEditControl1.Document.BeginUpdateCharacters(targetRange);
cp.Language = new DevExpress.XtraRichEdit.Model.LangInfo
    (new System.Globalization.CultureInfo("en-US"), new System.Globalization.CultureInfo("ar-SA"), new System.Globalization.CultureInfo("en-US"));
richEditControl1.Document.EndUpdateCharacters(cp);
See Also