Back to Content

Summarizer: outputLanguage property

files/en-us/web/api/summarizer/outputlanguage/index.md

latest755 B
Original Source

{{APIRef("Summarizer API")}}{{SeeCompatTable}}{{securecontext_header}}

The outputLanguage read-only property of the {{domxref("Summarizer")}} interface returns the language the summary should be generated in.

Value

A string specifying the language the summary should be generated in.

The string should be a valid {{glossary("BCP 47 language tag")}}.

Examples

js
const summarizer = await Summarizer.create({
  outputLanguage: "en-US",
  // ...
});

// Logs "en-US"
console.log(summarizer.outputLanguage);

Specifications

{{Specifications}}

Browser compatibility

{{Compat}}

See also