What type of hardware are you using: Old laptop or computer What YunoHost version are you running: 12.0.11 What app is this about: fail2ban allways in french
Describe your issue
Hi capable people,
I have some trouble using Fail2Ban because it is always in French. Firefox has a translate feature, but it is resetting after every click. It’s a bit annoying, and I wonder if there is a way to switch the application’s language permanently.
Seeing your log, I assume your Yunohost does not run French or English.
The app has this bit (in /var/www/fail2ban-web/engine.inc.php), where it tries to match the app to your system language and falls back to French if no match is found
#####################
# LANGUAGE #
#####################
$lang=substr($_SERVER['HTTP_ACCEPT_LANGUAGE'], 0, 2);
if(stream_resolve_include_path("language/$lang.php")) {
include ("language/$lang.php");
} else {
include ("language/fr.php");
}
As long as there is no German translation provided, there are three possible poor-man’s workarounds:
Change the aboove bit to read "else ( include (“language/en.php”);
Make a copy of the English language file (at /var/www/fail2ban-web/language) and name it de.php (I think , for German)
Delete the french laguage file, and rename the English one to fr.php
None of these will win beauty contest, but I would go with the first option.
Your changes may be overwritten by an app upgrade, but at least its a bit more of a permanent solution than the Firefox translate.
I have a better idea. Clone that repo, add German language (de.php for example, simply copy the content of the English file), propose it to the dev and ask him if it’s possible to integrate it to the app.