xenocrat / chyrp-lite

An ultra-lightweight blogging engine, written in PHP.
https://chyrplite.net/
BSD 3-Clause "New" or "Revised" License
416 stars 44 forks source link

Localization silently fails if gettext is not enabled under Linux #279

Open winrg opened 2 weeks ago

winrg commented 2 weeks ago

load_translator just doesn't do anything if no localization option is available. It would be nice to have it set a flag and show a toast in the admin panel warning about this if a language other than English is selected, or at least a line in the docs ensuring you have it turned on.

xenocrat commented 2 weeks ago

Hello there,

Thanks for raising this. I hadn't given this much thought because gettext does a lot of silent failing. I can detect the absence of PHP support, but even when PHP support is available, gettext will fail silently for many other reasons. When running on Windows, Chyrp Lite uses its own PHP-based shim for the gettext system; the most robust solution might be to make that the default on all host environments.