Skip to content

API reference / Common / Engine types / TextLanguage

Interface: TextLanguage ​

The span's language tags (w:lang / a:rPr@lang + @altLang) — BCP-47 tags such as "en-US" or "ja-JP", one per script slot.

The slots parallel the typeface / script-category triple: docx's val / eastAsia / bidi and pptx's lang / altLang fold onto latin / east_asian / complex. Each is independently optional — a span may tag only its East Asian text.

Properties ​

PropertyDescription
latin?
string
w:lang@val / a:rPr@lang — the Latin / default-script language.
eastAsian?
string
w:lang@eastAsia / a:rPr@altLang — the East Asian language.
complex?
string
w:lang@bidi — the complex-script (bidirectional) language. pptx has no twin.