Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with HTTPS or Subversion.

Download ZIP
Browse files

added DummyTranslator

  • Loading branch information...
commit 3fe30a668e352a5b1877e80899d7b91c040bcadb 1 parent badcfa7
@kolinger authored
Showing with 35 additions and 0 deletions.
  1. +3 −0  Config/SquareExtension.php
  2. +32 −0 Localization/DummyTranslator.php
View
3  Config/SquareExtension.php
@@ -41,6 +41,9 @@ public function loadConfiguration()
foreach ($config['modules'] as $extension) {
$this->compiler->addExtension($extension::NAME, new $extension);
}
+
+ $container->addDefinition($this->prefix('translator'))
+ ->setClass('Square\Localization\DummyTranslator');
}
}
View
32 Localization/DummyTranslator.php
@@ -0,0 +1,32 @@
+<?php
+
+/**
+ * This file is part of the Square CMS
+ *
+ * Copyright (c) 2011, 2012 Tomáš Kolinger <tomas@kolinger.name>
+ *
+ * For the full copyright and license information, please view the file license.txt that was distributed with this source code.
+ */
+
+namespace Square\Localization;
+
+
+
+/**
+ * @author Tomáš Kolinger <tomas@kolinger.name>
+ * @todo implements a real translator
+ */
+class DummyTranslator extends \Nette\Object implements \Nette\Localization\ITranslator
+{
+
+ /**
+ * @param string $string
+ * @param int $count
+ * @return string
+ */
+ public function translate($string, $count = 0)
+ {
+ return $string;
+ }
+
+}
Please sign in to comment.
Something went wrong with that request. Please try again.