Skip to content

Commit

Permalink
Added Greek translation thanks to @alinakis
Browse files Browse the repository at this point in the history
  • Loading branch information
benhall14 committed Jul 4, 2024
1 parent b1b8b15 commit 6808d02
Showing 1 changed file with 54 additions and 0 deletions.
54 changes: 54 additions & 0 deletions src/phpCalendar/Calendar.php
Original file line number Diff line number Diff line change
Expand Up @@ -257,6 +257,60 @@ public function useSpanish()
return $this;
}

/**
* Toggles the calendar locale to Greek. Thanks @alinakis
*/
public function useGreek()
{
$this->setDays([
'sunday' => [
'initials' => 'Κ',
'full' => 'Κυριακή'
],
'monday' => [
'initials' => 'Δ',
'full' => 'Δευτέρα',
],
'tuesday' => [
'initials' => 'Τ',
'full' => 'Τρίτη',
],
'wednesday' => [
'initials' => 'Τ',
'full' => 'Τετάρτη',
],
'thursday' => [
'initials' => 'Π',
'full' => 'Πέμπτη',
],
'friday' => [
'initials' => 'Π',
'full' => 'Παρασκευή',
],
'saturday' => [
'initials' => 'Σ',
'full' => 'Σάββατο',
],
]);

$this->setMonths([
'january' => 'Ιανουάριος',
'february' => 'Φεβρουάριος',
'march' => 'Μάρτιος',
'april' => 'Απρίλιος',
'may' => 'Μάϊος',
'june' => 'Ιούνιος',
'july' => 'Ιούλιος',
'august' => 'Αύγουστος',
'september' => 'Σεπτέμβριος',
'october' => 'Οκτώβριος',
'november' => 'Νοέμβριος',
'december' => 'Δεκέμβριος'
]);

return $this;
}

/**
* Sets the array of month names. Useful when translating.
*
Expand Down

0 comments on commit 6808d02

Please sign in to comment.