Permalink
Browse files

more lang -> locale renaming

  • Loading branch information...
1 parent 5224095 commit 75149eceab0350f91c0e9345a62a8edc0517f216 @cweiske cweiske committed Jun 4, 2012
Showing with 25 additions and 25 deletions.
  1. +2 −2 examples/translation.php
  2. +0 −23 tests/Date/HumanDiff/LangArrayTest.php
  3. +23 −0 tests/Date/HumanDiff/LocaleArrayTest.php
View
4 examples/translation.php
@@ -2,9 +2,9 @@
require_once 'Date/HumanDiff.php';
$dh = new Date_HumanDiff();
-$dh->setLanguage('de');
+$dh->setLocale('de');
//alternatively, you may pass in a locale:
-// $dh->setLanguage('de_AT');//falls back to the "de" language
+// $dh->setLocale('de_AT');//falls back to the "de" language
echo $dh->get(time() - 60 * 5) . "\n"; //shows "vor 5 Minuten"
?>
View
23 tests/Date/HumanDiff/LangArrayTest.php
@@ -1,23 +0,0 @@
-<?php
-require_once 'Date/HumanDiff/Lang/de.php';
-
-class Date_HumanDiff_LangArrayTest extends PHPUnit_Framework_TestCase
-{
- public function setUp()
- {
- $this->la = new Date_HumanDiff_Lang_de();
- }
-
-
- public function testNoTranslation()
- {
- $this->assertEquals('foo bar', $this->la->get('foo bar'));
- }
-
- public function testTranslation()
- {
- $this->assertEquals('gerade eben', $this->la->get('just now'));
- }
-}
-
-?>
View
23 tests/Date/HumanDiff/LocaleArrayTest.php
@@ -0,0 +1,23 @@
+<?php
+require_once 'Date/HumanDiff/Locale/de.php';
+
+class Date_HumanDiff_LocaleArrayTest extends PHPUnit_Framework_TestCase
+{
+ public function setUp()
+ {
+ $this->la = new Date_HumanDiff_Locale_de();
+ }
+
+
+ public function testNoTranslation()
+ {
+ $this->assertEquals('foo bar', $this->la->get('foo bar', 0));
+ }
+
+ public function testTranslation()
+ {
+ $this->assertEquals('gerade eben', $this->la->get('just now', 0));
+ }
+}
+
+?>

0 comments on commit 75149ec

Please sign in to comment.