SetDocumentLanguage
Document properties, Accessibility
Description
Sets the document's natural language in the PDF Catalog (/Lang entry). The language declaration is used by screen readers and other assistive technology to apply correct pronunciation and text-to-speech rules
This function writes the Catalog /Lang key directly. When using PDF/UA mode, the language should instead be supplied via the SetPDFUAMode Language parameter, which calls this function internally
Syntax
Delphi
Function TPDFlib.SetDocumentLanguage(Const Language: WideString): Integer;
ActiveX
Function PDFlib::SetDocumentLanguage(Language As String) As Long
DLL
int DLSetDocumentLanguage(int InstanceID, const wchar_t * Language);
Parameters
| Language | BCP 47 language tag, e.g. "en-US", "fr", "zh-TW". Must be non-empty. |
|---|
Return values
| 0 | Language string was empty; no change was made |
|---|---|
| 1 | Language was set successfully |