MDL-80731 core: ensure valid /Lang attribute in generated PDF files.

As with the changes in 4be39296, PDF files have criteria for validity
of language identifiers.
This commit is contained in:
Paul Holden
2024-02-22 16:51:39 +00:00
parent d3ad77e476
commit e3e2c71901
+2 -2
View File
@@ -168,9 +168,9 @@ class pdf extends TCPDF {
parent::__construct($orientation, $unit, $format, $unicode, $encoding);
// theses replace the tcpdf's config/lang/ definitions
// These values replace TCPDF's own config/lang definitions.
$this->l['w_page'] = get_string('page');
$this->l['a_meta_language'] = current_language();
$this->l['a_meta_language'] = get_html_lang_attribute_value(current_language());
$this->l['a_meta_charset'] = 'UTF-8';
$this->l['a_meta_dir'] = get_string('thisdirection', 'langconfig');
}