LanguagePreferences Class

Allows to set up language preferences.
Inheritance Hierarchy
SystemObject
  Aspose.WordsLanguagePreferences

Namespace:  Aspose.Words
Assembly:  Aspose.Words (in Aspose.Words.dll) Version: 20.3
Syntax
public class LanguagePreferences

The LanguagePreferences type exposes the following members.

Constructors
  NameDescription
Public methodLanguagePreferences
Initializes a new instance of the LanguagePreferences class
Properties
  NameDescription
Public propertyCode exampleDefaultEditingLanguage

Gets or sets default editing language.

The default value is EnglishUS.

Methods
  NameDescription
Public methodCode exampleAddEditingLanguage
Adds additional editing language.
Public methodAddEditingLanguages
Adds additional editing languages.
Public methodEquals (Inherited from Object.)
Public methodGetHashCode (Inherited from Object.)
Public methodGetType (Inherited from Object.)
Public methodToString (Inherited from Object.)
Remarks
Implements 'Set the Office Language Preferences' dialog in Word.
Examples
Shows how to set up language preferences that will be used when document is loading
LoadOptions loadOptions = new LoadOptions();
loadOptions.LanguagePreferences.AddEditingLanguage(EditingLanguage.Japanese);

Document doc = new Document(MyDir + "Document.docx", loadOptions);

int localeIdFarEast = doc.Styles.DefaultFont.LocaleIdFarEast;
Console.WriteLine(localeIdFarEast == (int) EditingLanguage.Japanese
    ? "The document either has no any FarEast language set in defaults or it was set to Japanese originally."
    : "The document default FarEast language was set to another than Japanese language originally, so it is not overridden.");
See Also