Additional Option '-lang'

We need a language option for hyphenation support (see Support of Hyphenation), and for the support of new wrap mode codepoint (see Additional Wrap Mode 'codepoint'):

Command-Line Name: -lang
Database Name: lang
Database Class: Lang

Setting the language code of the text content. The language code will be used for line breaking (but only if option -useunibreak is also set), and it may be used to restrict the hyphenation rules (see -hyphenrules). An empty string is unsetting the language.

The language code will be specified as ISO 639-1 code. The language code will not be verified, but it must be a string with two consecutive lowercase letters (for example "en"), or an empty string, otherwise an error will be thrown.

Because a text may contain several languages, we need also the tag option -lang:

-lang code

Setting the language code of the text content inside the tagged region. If this tag option is specified, it overrides the -lang option for the text widget. For a detailed description of this option see widget option -lang.