Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with
or
.
Download ZIP
Browse files

translation example

  • Loading branch information...
commit ec882eb9bc7759f864ffe76ce0039ae4ac00a4e1 1 parent 3e4a6eb
@cweiske cweiske authored
Showing with 10 additions and 0 deletions.
  1. +10 −0 examples/translation.php
View
10 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.
Something went wrong with that request. Please try again.