Combine translations months and weekdays into a single, calendar-related file
ADD
resources/lang/en/calendar.php
+<?php
+
+return [
+ 'months' => [
+ 1 => 'January',
+ 2 => 'February',
+ 3 => 'March',
+ 4 => 'April',
+ 5 => 'May',
+ 6 => 'June',
+ 7 => 'July',
+ 8 => 'August',
+ 9 => 'September',
+ 10 => 'October',
+ 11 => 'November',
+ 12 => 'December'
+ ],
+ 'weekdays' => [
+ 0 => 'Monday',
+ 1 => 'Tuesday',
+ 2 => 'Wednesday',
+ 3 => 'Thursday',
+ 4 => 'Friday',
+ 5 => 'Saturday',
+ 6 => 'Sunday'
+ ]
+];

DELETE
resources/lang/en/months.php
-<?php
-
-return [
- '1' => 'January',
- '2' => 'February',
- '3' => 'March',
- '4' => 'April',
- '5' => 'May',
- '6' => 'June',
- '7' => 'July',
- '8' => 'August',
- '9' => 'September',
- '10' => 'October',
- '11' => 'November',
- '12' => 'December'
-];

DELETE
resources/lang/en/weekdays.php
-<?php
-
-return [
- 0 => 'Monday',
- 1 => 'Tuesday',
- 2 => 'Wednesday',
- 3 => 'Thursday',
- 4 => 'Friday',
- 5 => 'Saturday',
- 6 => 'Sunday'
-];

ADD
resources/lang/nl/calendar.php
+<?php
+
+return [
+ 'months' => [
+ 1 => 'Januari',
+ 2 => 'Februari',
+ 3 => 'Maart',
+ 4 => 'April',
+ 5 => 'Mei',
+ 6 => 'Juni',
+ 7 => 'Juli',
+ 8 => 'Augustus',
+ 9 => 'September',
+ 10 => 'Oktober',
+ 11 => 'November',
+ 12 => 'December'
+ ],
+ 'weekdays' => [
+ 0 => 'Maandag',
+ 1 => 'Dinsdag',
+ 2 => 'Woensdag',
+ 3 => 'Donderdag',
+ 4 => 'Vrijdag',
+ 5 => 'Zaterdag',
+ 6 => 'Zondag'
+ ]
+];

DELETE
resources/lang/nl/months.php
-<?php
-
-return [
- '1' => 'Januari',
- '2' => 'Februari',
- '3' => 'Maart',
- '4' => 'April',
- '5' => 'Mei',
- '6' => 'Juni',
- '7' => 'Juli',
- '8' => 'Augustus',
- '9' => 'September',
- '10' => 'Oktober',
- '11' => 'November',
- '12' => 'December'
-];

DELETE
resources/lang/nl/weekdays.php
-<?php
-
-return [
- 0 => 'Maandag',
- 1 => 'Dinsdag',
- 2 => 'Woensdag',
- 3 => 'Donderdag',
- 4 => 'Vrijdag',
- 5 => 'Zaterdag',
- 6 => 'Zondag'
-];

MODIFY
resources/views/budgets/create.blade.php
resources/views/budgets/create.blade.php
<select name="month">
<option>-</option>
@for ($month = 1; $month <= 12; $month ++)
- <option value="{{ $month }}">@lang('months.' . $month)</option>
+ <option value="{{ $month }}">@lang('calendar.months.' . $month)</option>
@endfor
</select>
</div>

MODIFY
resources/views/dashboard.blade.php
resources/views/dashboard.blade.php
@section('body')
<div class="wrapper spacing-top-large spacing-bottom-large">
- <div style="color: black; margin-bottom: 20px;">{{ __('months.' . $month) }}</div>
+ <div style="color: black; margin-bottom: 20px;">{{ __('calendar.months.' . $month) }}</div>
<div class="box mb-4">
<div class="box__section row">
<div class="row__column text-center">
</div>
<div class="row__column text-center">
<div class="mb-1" style="margin-bottom: 10px; color: #A7AEBB;">Most Expensive Day</div>
- <h2>{{ count($mostExpensiveWeekday) ? __('weekdays.' . $mostExpensiveWeekday[0]->weekday) : '-' }}</h2>
+ <h2>{{ count($mostExpensiveWeekday) ? __('calendar.weekdays.' . $mostExpensiveWeekday[0]->weekday) : '-' }}</h2>
</div>
</div>
@if (count($tagsBreakdown))

Combine translations months and weekdays into a single, calendar-related file