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.9
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
Determines whether the specified Object is equal to the current Object.
(Inherited from Object.)
Protected methodFinalize
Allows an object to try to free resources and perform other cleanup operations before it is reclaimed by garbage collection.
(Inherited from Object.)
Public methodGetHashCode
Serves as a hash function for a particular type.
(Inherited from Object.)
Public methodGetType
Gets the type of the current instance.
(Inherited from Object.)
Protected methodMemberwiseClone
Creates a shallow copy of the current Object.
(Inherited from Object.)
Public methodToString
Returns a string that represents the current object.
(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
[C#]

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