Skip to main content

GetLanguage

Returns the document language.

Syntax

expression.GetLanguage();

expression - A variable that represents a ApiCore class.

Parameters

This method doesn't have any parameters.

Returns

string

Example

This example demonstrates how to get the language of the current document using the ApiCore.

const doc = Api.GetDocument();
const core = doc.GetCore();
core.SetLanguage("en-US");

const language = core.GetLanguage();
let paragraph = doc.GetElement(0);
paragraph.AddText("Language: " + language);