LanguagePreferences

LanguagePreferences class

Allows to set up language preferences.

To learn more, visit the Specify Load Options documentation article.

public class LanguagePreferences

Constructors

NameDescription
LanguagePreferences()The default constructor.

Properties

NameDescription
DefaultEditingLanguage { get; set; }Gets or sets default editing language.

Methods

NameDescription
AddEditingLanguage(EditingLanguage)Adds additional editing language.
AddEditingLanguages(EditingLanguage[])Adds additional editing languages.

Remarks

Implements ‘Set the Office Language Preferences’ dialog in Word.

Examples

Shows how to apply language preferences when loading a document.

LoadOptions loadOptions = new LoadOptions();
loadOptions.LanguagePreferences.AddEditingLanguage(EditingLanguage.Japanese);

Document doc = new Document(MyDir + "No default editing language.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