THotPDF.GetLoadedLanguage Method
Reads the natural language identifier recorded in the Catalog of the loaded PDF document
Declaration
function GetLoadedLanguage: AnsiString;
Unit
HPDFDoc
Return value
Returns a language tag string conforming to the BCP 47 / RFC 3066 format (e.g., 'zh-CN', 'en-US', 'en-GB'); returns an empty string if there is no Lang key in the document Catalog
Usage notes
- Lang 键位于文档目录(Catalog)字典,代表整份文档的默认语言;页面或内容流中可能有覆盖性的局部语言标记
- The return value is used by accessibility tools and screen readers, and can also assist in determining the text writing direction
- If the language identifier needs to be modified, please use the SetLoadedLanguage method