Aspose::Words::Loading::LanguagePreferences::get_DefaultEditingLanguage method

LanguagePreferences::get_DefaultEditingLanguage method

Gets or sets default editing language. The default value is EnglishUS.

Aspose::Words::Loading::EditingLanguage Aspose::Words::Loading::LanguagePreferences::get_DefaultEditingLanguage() const

Examples

Shows how set a default language when loading a document.

auto loadOptions = MakeObject<LoadOptions>();
loadOptions->get_LanguagePreferences()->set_DefaultEditingLanguage(EditingLanguage::Russian);

auto doc = MakeObject<Document>(MyDir + u"No default editing language.docx", loadOptions);

int localeId = doc->get_Styles()->get_DefaultFont()->get_LocaleId();
std::cout << (localeId == (int)EditingLanguage::Russian
                  ? String(u"The document either has no any language set in defaults or it was set to Russian originally.")
                  : String(u"The document default language was set to another than Russian language originally, so it is not overridden."))
          << std::endl;

See Also