Permalink
Browse files

translation example

  • Loading branch information...
1 parent 3e4a6eb commit ec882eb9bc7759f864ffe76ce0039ae4ac00a4e1 @cweiske cweiske committed May 10, 2012
Showing with 10 additions and 0 deletions.
  1. +10 −0 examples/translation.php
@@ -0,0 +1,10 @@
+<?php
+require_once 'Date/HumanDiff.php';
+
+$dh = new Date_HumanDiff();
+$dh->setLanguage('de');
+//alternatively, you may pass in a locale:
+// $dh->setLanguage('de_AT');//falls back to the "de" language
+
+echo $dh->get(time() - 60 * 5) . "\n"; //shows "vor 5 Minuten"
+?>

0 comments on commit ec882eb

Please sign in to comment.