>   However, I don't know what problem is being solved by outputting the
document
language with this command.

specifying the language is mandated by the PDF/UA-2 accessibility standard.
When generating tagged PDF
latex will always add a language, defaulting to `en`.

Users don't have to know the BCP codes (although they can be used that way)
but typically they can use a language package such as babel that takes
friendlier names such as

\usepackage[german]{babel}

babel will set up fixed texts and hyphenation for german and (for tagged
documents) will also arrange that lang=de gets added.
but if texinfo already has the language in bcp 47 form to hand then it
could directly add it in documentmetada.

Reply via email to