Skip to content

Commit

Permalink
Merge pull request #7 from A909M/add-translation-support
Browse files Browse the repository at this point in the history
Add Multi language support. And Arabic language support
  • Loading branch information
aymanalhattami authored Nov 30, 2024
2 parents cd0d171 + 6542540 commit a21ae9e
Show file tree
Hide file tree
Showing 5 changed files with 311 additions and 90 deletions.
8 changes: 8 additions & 0 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -37,6 +37,14 @@ public static function table(Table $table): Table
// ...
```

#### Translations

Publish the translations using:

```bash
php artisan vendor:publish --tag="filament-date-scopes-filter-translations"
```

### Changelog

Please see [CHANGELOG](CHANGELOG.md) for more information what has changed recently.
Expand Down
100 changes: 100 additions & 0 deletions resources/lang/ar/date-scope.php
Original file line number Diff line number Diff line change
@@ -0,0 +1,100 @@
<?php

return [
'Seconds' => [
'label' => 'ثواني',
'ofJustNow' => 'الآن',
'ofLastSecond' => 'الثانية الماضية',
'ofLast15Seconds' => 'آخر 15 ثانية',
'ofLast30Seconds' => 'آخر 30 ثانية',
'ofLast45Seconds' => 'آخر 45 ثانية',
'ofLast60Seconds' => 'آخر 60 ثانية',
'ofLastSeconds' => 'الثواني الماضية',
],
'Minutes' => [
'label' => 'الدقائق',
'ofLastMinute' => 'الدقيقة الماضية',
'ofLast15Minutes' => 'آخر 15 دقيقة',
'ofLast30Minutes' => 'آخر 30 دقيقة',
'ofLast45Minutes' => 'آخر 45 دقيقة',
'ofLast60Minutes' => 'آخر 60 دقيقة',
'ofLastMinutes' => 'الدقائق الماضية',
],
'Hours' => [
'label' => 'الساعات',
'ofLastHour' => 'الساعة الماضية',
'ofLast6Hours' => 'آخر 6 ساعات',
'ofLast12Hours' => 'آخر 12 ساعة',
'ofLast18Hours' => 'آخر 18 ساعة',
'ofLast24Hours' => 'آخر 24 ساعة',
'ofLastHours' => 'الساعات الماضية',
],
'Days' => [
'label' => 'الأيام',
'ofToday' => 'اليوم',
'ofYesterday' => 'أمس',
'ofLast7Days' => 'آخر 7 أيام',
'ofLast21Days' => 'آخر 21 يوماً',
'ofLast30Days' => 'آخر 30 يوماً',
'ofLastDays' => 'الأيام الماضية',
],
'Weeks' => [
'label' => 'الأسابيع',
'ofLastWeek' => 'الأسبوع الماضي',
'ofLast2Weeks' => 'آخر أسبوعين',
'ofLast3Weeks' => 'آخر 3 أسابيع',
'ofLast4Weeks' => 'آخر 4 أسابيع',
'ofLastWeeks' => 'الأسابيع الماضية',
],
'Months' => [
'label' => 'الأشهر',
'ofLastMonth' => 'الشهر الماضي',
'ofLast3Months' => 'آخر 3 أشهر',
'ofLast6Months' => 'آخر 6 أشهر',
'ofLast9Months' => 'آخر 9 أشهر',
'ofLast12Months' => 'آخر 12 شهراً',
'ofLastMonths' => 'الأشهر الماضية',
],
'Quarters' => [
'label' => 'الأرباع',
'ofLastQuarter' => 'الربع الماضي',
'ofLast2Quarters' => 'آخر ربعين',
'ofLast3Quarters' => 'آخر 3 أرباع',
'ofLast4Quarters' => 'آخر 4 أرباع',
'ofLastQuarters' => 'الأرباع الماضية',
],
'Years' => [
'label' => 'السنوات',
'ofLastYear' => 'العام الماضي',
'ofLastYears' => 'السنوات الماضية',
],
'Decades' => [
'label' => 'العقود',
'ofLastDecade' => 'العقد الماضي',
'ofLastDecades' => 'العقود الماضية',
],
'Centuries' => [
'label' => 'القرون',
'ofLastCentury' => 'القرن الماضي',
'ofLastCenturies' => 'القرون الماضية',
],
'Millenniums' => [
'label' => 'الألفيات',
'ofLastMillennium' => 'الألفية الماضية',
'ofLastMillenniums' => 'الألفيات الماضية',
],
'toNow/toDate' => [
'label' => 'حتى الآن / حتى اليوم',
'secondToNow' => 'الثانية حتى الآن',
'minuteToNow' => 'الدقيقة حتى الآن',
'hourToNow' => 'الساعة حتى الآن',
'dayToNow' => 'اليوم حتى الآن',
'weekToDate' => 'الأسبوع حتى اليوم',
'monthToDate' => 'الشهر حتى اليوم',
'quarterToDate' => 'الربع حتى اليوم',
'yearToDate' => 'السنة حتى اليوم',
'decadeToDate' => 'العقد حتى اليوم',
'centuryToDate' => 'القرن حتى اليوم',
'millenniumToDate' => 'الألفية حتى اليوم',
],
];
100 changes: 100 additions & 0 deletions resources/lang/en/date-scope.php
Original file line number Diff line number Diff line change
@@ -0,0 +1,100 @@
<?php

return [
'Seconds' => [
'label' => 'Seconds',
'ofJustNow' => 'Just Now',
'ofLastSecond' => 'Last Second',
'ofLast15Seconds' => 'Last 15 Seconds',
'ofLast30Seconds' => 'Last 30 Seconds',
'ofLast45Seconds' => 'Last 45 Seconds',
'ofLast60Seconds' => 'Last 60 Seconds',
'ofLastSeconds' => 'Last Seconds',
],
'Minutes' => [
'label' => 'Minutes',
'ofLastMinute' => 'Last Minute',
'ofLast15Minutes' => 'Last 15 Minutes',
'ofLast30Minutes' => 'Last 30 Minutes',
'ofLast45Minutes' => 'Last 45 Minutes',
'ofLast60Minutes' => 'Last 60 Minutes',
'ofLastMinutes' => 'Last Minutes',
],
'Hours' => [
'label' => 'Hours',
'ofLastHour' => 'Last Hour',
'ofLast6Hours' => 'Last 6 Hours',
'ofLast12Hours' => 'Last 12 Hours',
'ofLast18Hours' => 'Last 18 Hours',
'ofLast24Hours' => 'Last 24 Hours',
'ofLastHours' => 'Last Hours',
],
'Days' => [
'label' => 'Days',
'ofToday' => 'Today',
'ofYesterday' => 'Yesterday',
'ofLast7Days' => 'Last 7 Days',
'ofLast21Days' => 'Last 21 Days',
'ofLast30Days' => 'Last 30 Days',
'ofLastDays' => 'Last Days',
],
'Weeks' => [
'label' => 'Weeks',
'ofLastWeek' => 'Last Week',
'ofLast2Weeks' => 'Last 2 Weeks',
'ofLast3Weeks' => 'Last 3 Weeks',
'ofLast4Weeks' => 'Last 4 Weeks',
'ofLastWeeks' => 'Last Weeks',
],
'Months' => [
'label' => 'Months',
'ofLastMonth' => 'Last Month',
'ofLast3Months' => 'Last 3 Months',
'ofLast6Months' => 'Last 6 Months',
'ofLast9Months' => 'Last 9 Months',
'ofLast12Months' => 'Last 12 Months',
'ofLastMonths' => 'Last Months',
],
'Quarters' => [
'label' => 'Quarters',
'ofLastQuarter' => 'Last Quarter',
'ofLast2Quarters' => 'Last 2 Quarters',
'ofLast3Quarters' => 'Last 3 Quarters',
'ofLast4Quarters' => 'Last 4 Quarters',
'ofLastQuarters' => 'Last Quarters',
],
'Years' => [
'label' => 'Years',
'ofLastYear' => 'Last Year',
'ofLastYears' => 'Last Years',
],
'Decades' => [
'label' => 'Decades',
'ofLastDecade' => 'Last Decade',
'ofLastDecades' => 'Last Decades',
],
'Centuries' => [
'label' => 'Centuries',
'ofLastCentury' => 'Last Century',
'ofLastCenturies' => 'Last Centuries',
],
'Millenniums' => [
'label' => 'Millenniums',
'ofLastMillennium' => 'Last Millennium',
'ofLastMillenniums' => 'Last Millenniums',
],
'toNow/toDate' => [
'label' => 'To Now / To Date',
'secondToNow' => 'Second To Now',
'minuteToNow' => 'Minute To Now',
'hourToNow' => 'Hour To Now',
'dayToNow' => 'Day To Now',
'weekToDate' => 'Week To Date',
'monthToDate' => 'Month To Date',
'quarterToDate' => 'Quarter To Date',
'yearToDate' => 'Year To Date',
'decadeToDate' => 'Decade To Date',
'centuryToDate' => 'Century To Date',
'millenniumToDate' => 'Millennium To Date',
],
];
Loading

0 comments on commit a21ae9e

Please sign in to comment.