a quick solution for the Flatpress 1.2.1 problem described in the Flatpress Github here:
-> https://github.com/flatpressblog/flatpress/issues/132
Download the file "/fp-includes/smarty/plugins/function.html_select_date.php", edit it with a UTF-8 Editor and replace the lines 227 - 230
Code: Select all
for ($i = 1; $i <= 31; $i++) {
$days[] = sprintf($day_format, $i);
$day_values[] = sprintf($day_value_format, $i);
}
Code: Select all
/*
* Flatpress issue #132
* Months are displayed in the wrong language in the search
*
* Debug: 2022-09-18
* Using now the month_names from the Flatpress language files
*/
global $lang;
$replace_month_names = array();
$replace_month_names[0] = '-';
$fp_lang_months = array();
$fp_lang_months = $lang['date']['month'];
$fplm = 0;
for ($lm = 1; $lm <= 12; $lm++) {
$replace_month_names[$lm] = $fp_lang_months[$fplm];
$fplm++;
}
for ($i = 1; $i <= 12; $i++) {
$month_names[$i] = $replace_month_names[$i];
$month_values[$i] = date($month_value_format, mktime(0, 0, 0, $i, 1, 2000));
}
Tested with Flatpress 1.2.1 on a Web server with PHP 8.0.23.