[DOC-CVS] [doc-base] standalone-mode: Don't define LANG in standalone mode
[email protected] (Jordi Kroon)
| Newsgroups | php.doc.cvs |
|---|---|
| Message-ID | <[email protected]> |
Author: Jordi Kroon (jordikroon)
Date: 2026-08-04T20:04:17+02:00
Commit: https://github.com/php/doc-base/commit/79ce0ed8511eee6cdc9a8e039945c5a2464ec893
Raw diff: https://github.com/php/doc-base/commit/79ce0ed8511eee6cdc9a8e039945c5a2464ec893.diff
Don't define LANG in standalone mode
Changed paths:
M configure.php
Diff:
diff --git a/configure.php b/configure.php
index ba848eac7a..407450a679 100755
--- a/configure.php
+++ b/configure.php
@@ -652,7 +652,13 @@ function dtd_pe_body( string $filename = '' )
$chmpath = dtd_pe_body();
$conf = [];
- $conf[] = "<!ENTITY LANG '$lang'>";
+
+ // Standalone trees are not named after a language, so they must
+ // declare xml:lang themselves. Not defining &LANG; makes any
+ // accidental use of it fail.
+ if ( $ac['STANDALONE'] != 'yes' )
+ $conf[] = "<!ENTITY LANG '$lang'>";
+
$conf[] = "<!ENTITY manual.chmonly $chmpath>";
$conf[] = "<!ENTITY % base-entities $baseEnt1>";