<div dir="ltr"><div dir="ltr"></div><div class="gmail_quote"><div><br></div><div>Hi Damyan,</div><div><br></div><div>Thanks for your follow-up!</div><div> </div><blockquote class="gmail_quote" style="margin:0px 0px 0px 0.8ex;border-left:1px solid rgb(204,204,204);padding-left:1ex">It would be nice if you could share the translate.php contents (or <br>
a minimal version) so that the issue can be reproduced and any <br>
prospective fixes/workarounds be tested.<br></blockquote><div><br></div><div>As a matter of fact, I was right in the middle of reproducing this on another Debian 10 machine. It can be reproduced easily.</div><div><br></div><div>Just use a standard Apache installation with libapache2-mod-php7.3, place the translate.php in the document root and create the locale structure in the same path as translate.php: ./locale/de_CH.UTF-8/LC_MESSAGES/</div><div>Inside LC_MESSAGES place a homepage.po file, here's an example:</div><div><br></div><div></div><div>------- cut -------</div><div># Sample translation.<br># Copyright (C) 2020 Infiniroot.<br># Infiniroot LLC <<a href="mailto:redacted@example.com">redacted@example.com</a>>, 2020.<br>#<br>#, fuzzy<br>msgid ""<br>msgstr ""<br>"Project-Id-Version: Infiniroot 1.0\n"<br>"Report-Msgid-Bugs-To: \n"<br>"POT-Creation-Date: 2020-11-16 10:00+0100\n"<br>"PO-Revision-Date: 2020-11-16 10:00+0100\n"<br>"Last-Translator: Infiniroot <<a href="mailto:redacted@example.com">redacted@example.com</a>>\n"<br>"Language-Team: Infiniroot <<a href="mailto:redacted@example.com">redacted@example.com</a>>\n"<br>"MIME-Version: 1.0\n"<br>"Content-Type: text/plain; charset=UTF-8\n"<br>"Content-Transfer-Encoding: 8bit\n"<br>"Language: de\n"<br>"Plural-Forms: nplurals=2; plural=(n != 1);\n"<br><br># Home page<br>msgid "Dedicated Hosting Description"<br>msgstr "Mein deutscher Text"</div><div>------- cut -------</div><div><br></div><div>Then use msgfmt command (from the gettext package) to create a binary mo file:<br></div><div><br></div><div>cd locale/de_CH.UTF-8/LC_MESSAGES/; msgfmt homepage.po --output-file=homepage.mo -v</div><div><br></div><div>When you now launch the translate.php file through Apache (you can use curl), it should translate and show the German translation. <br></div><div><br></div><div>$ curl localhost/translate.php</div><div>Mein deutscher Text</div><div><br></div><div>Then install and enable the libapache2-mod-perl2 module and restart Apache. The translation stops working.</div><div><br></div><div><div>$ curl localhost/translate.php</div><div>Original English was returned. Something wrong</div></div><div><br></div><div>I published a blog article about this behaviour yesterday: <a href="https://www.claudiokuenzler.com/blog/1023/php-gettext-translations-not-working-apache-mod_php-cli-works">https://www.claudiokuenzler.com/blog/1023/php-gettext-translations-not-working-apache-mod_php-cli-works</a>. The sample translate.php is included in the article. <br></div><div><br></div><div>Hope this helps. Am available for debugging this together if you want.<br></div></div></div>