Author: Leonardo Lara Rodrigues (leonardolara)
Committer: GitHub (web-flow)
Pusher: saundefined
Date: 2026-01-18T22:13:25+03:00

Commit: 
https://github.com/php/web-php/commit/d965e37a1e0ca46ebd8961ca41a729b8bd41619d
Raw diff: 
https://github.com/php/web-php/commit/d965e37a1e0ca46ebd8961ca41a729b8bd41619d.diff

Change language code to lowercase for translation file (#1775)

For languages like 'pt_BR', the filename is pt_br.ini as well as the repo is 
/pt_br.

The pt_BR pages' headers and footers are not being translated.

Changed paths:
  M  include/shared-manual.inc


Diff:

diff --git a/include/shared-manual.inc b/include/shared-manual.inc
index ff2eae90b2..0a7c6e8ac7 100644
--- a/include/shared-manual.inc
+++ b/include/shared-manual.inc
@@ -292,7 +292,7 @@ function autogen(string $text, string $lang) {
         throw new \InvalidArgumentException("Cannot autogenerate text for 
'$text'");
     }
 
-    $translationFile = __DIR__ . \DIRECTORY_SEPARATOR . "ui_translation" . 
\DIRECTORY_SEPARATOR . $lang . ".ini";
+    $translationFile = __DIR__ . \DIRECTORY_SEPARATOR . "ui_translation" . 
\DIRECTORY_SEPARATOR . strtolower($lang) . ".ini";
 
     if (!\file_exists($translationFile)) {
         if ($lang !== "en") {

Reply via email to