SetTextFlowLanguage
Text, layout
Description
Sets the primary language used when a TextFlow chooses discretionary word breaks
Syntax
Delphi
Function TPDFlib.SetTextFlowLanguage(FlowID: Integer; Const Language: WideString): Integer;ActiveX
Function PDFlib::SetTextFlowLanguage(FlowID As Long, Language As String) As LongDLL
int DLSetTextFlowLanguage(int InstanceID, int FlowID, const wchar_t* Language);Parameters
| FlowID | TextFlow handle returned by NewTextFlow |
|---|---|
| Language | BCP 47 language tag or an empty string to clear the language |
Return values
Returns 1 when the flow and language syntax are valid, or 0 otherwise
Remarks
The primary tag is normalised to lowercase and retained without region or script subtags
Automatic hyphenation supports en, de, nl, fr, es, it, pt, ru, and tr
A newly created TextFlow inherits the document Catalog /Lang value and enables automatic hyphenation when its primary language is supported
Setting an unsupported but syntactically valid primary tag disables automatic hyphenation while discretionary soft hyphens remain available