Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with HTTPS or Subversion.

Download ZIP
Browse files

add greek translation

  • Loading branch information...
commit dc4e5cc3594975bd4c9baab42dac4e83fd916d6f 1 parent b541328
@akDeveloper akDeveloper authored
Showing with 35 additions and 1 deletion.
  1. +28 −0 src/Date/HumanDiff/Lang/el.php
  2. +7 −1 tests/Date/HumanDiffTest.php
View
28 src/Date/HumanDiff/Lang/el.php
@@ -0,0 +1,28 @@
+<?php
+require_once 'Date/HumanDiff/LangArray.php';
+
+class Date_HumanDiff_Lang_el extends Date_HumanDiff_LangArray
+{
+ /**
+ * Translation array.
+ * Key is the english variant, value the greek translation.
+ *
+ * @var array
+ */
+ public $trans = array(
+ 'just now' => 'μόλις τώρα',
+ 'a minute ago' => 'πριν ένα λεπτό',
+ '%d minutes ago' => 'πριν %d λεπτά',
+ 'an hour ago' => 'πριν μία ώρα',
+ '%d hours ago' => 'πριν %d ώρες',
+ 'yesterday' => 'εχθές',
+ '%d days ago' => 'πριν %d ημέρες',
+ 'a week ago' => 'πριν μια εβδομάδα',
+ '%d weeks ago' => 'πρίν %d εβδομάδες',
+ 'a month ago' => 'πριν ένα μήνα',
+ '%d months ago' => 'πριν %d μήνες',
+ 'a year ago' => 'πριν ένα χρόνο',
+ '%d years ago' => 'πριν %d χρόνια',
+ );
+}
+?>
View
8 tests/Date/HumanDiffTest.php
@@ -101,12 +101,18 @@ public function testSetLanguageExisting()
{
$this->assertTrue($this->dh->setLanguage('de'));
$this->assertEquals('gerade eben', $this->dh->get(time()));
+
+ $this->assertTrue($this->dh->setLanguage('el'));
+ $this->assertEquals('μόλις τώρα', $this->dh->get(time()));
}
public function testSetLanguageParentExisting()
{
$this->assertTrue($this->dh->setLanguage('de_AT'));
$this->assertEquals('gerade eben', $this->dh->get(time()));
+
+ $this->assertTrue($this->dh->setLanguage('el_GR'));
+ $this->assertEquals('μόλις τώρα', $this->dh->get(time()));
}
public function testSetLanguageNotExisting()
@@ -140,4 +146,4 @@ public function testAddFormatSorted()
}
}
-?>
+?>
Please sign in to comment.
Something went wrong with that request. Please try again.