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

Namespace: Aspose.Words
Assembly: Aspose.Words (in Aspose.Words.dll) Version: 19.11
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.)
Protected methodFinalize (Inherited from Object.)
Public methodGetHashCode (Inherited from Object.)
Public methodGetType (Inherited from Object.)
Protected methodMemberwiseClone (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.EditingLanguage.docx", loadOptions);

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