Month name is not displayed correctly in start of week in other language.

The issue is here:
https://github.com/SimpleMachines/SMF2.1/blob/416b859bea7570953fa4aae570e1c94736774f68/Sources/Subs-Calendar.php#L593-L598
597 generate the text,
i got no idea how to fix this in a nice way.
Maybe with something like this?
$txt['months_titles'][$calendar_data['current_month']]
Not right. Thats is it:
https://github.com/SimpleMachines/SMF2.1/blob/cc6b057dda6ec6cdadfb610ef385113c6e7e82ba/Themes/default/languages/index.english.php#L530
and this is the relevant position
date('F', $timestamp)
The issue is here:
SMF2.1/Sources/Subs-Calendar.phpLines 593 to 598 in 416b859
// An adjustment value to apply to all calculated week numbers.
if (!empty($calendarOptions['show_week_num']))
{
$timestamp = mktime(0, 0, 0, $month, $day, $year);
$calendarGrid['week_title'] = sprintf($txt['calendar_week_beginning'], date('F', $timestamp), date('j', $timestamp), date('Y', $timestamp));
}597 generate the text,
i got no idea how to fix this in a nice way.
@albertlast , you were faster. Had overlooked your answer.
Maybe:
$calendarGrid['week_title'] = sprintf($txt['calendar_week_beginning'], $txt['months'][date('n', $timestamp)], date('j', $timestamp), date('Y', $timestamp));
Thats works.
If only setlocale() were actually reliable for this...
Just replace
date('F', $timestamp)
with
$txt['months'][date('n', $timestamp)]
Maybe:
$calendarGrid['week_title'] = sprintf($txt['calendar_week_beginning'], $txt['months'][date('n', $timestamp)], date('j', $timestamp), date('Y', $timestamp));Thats works.
I had already suggested this in my previous post
This was fixed in https://github.com/SimpleMachines/SMF2.1/commit/64df5cdb80782f182bf6efda57991d2c05df5b3d @Sesquipedalian
Er, how does that commit fix this issue?
Welp, sorry. Apparently wrong commit. Anyway it was fixed in #5611 as we can see in:
https://github.com/SimpleMachines/SMF2.1/blob/6ba1e53c0b65edb202fa17b9dc0088f610fdbfd8/Sources/Subs-Calendar.php#L613