aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorWilly Micieli <micieli@laposte.net>2019-10-26 16:58:27 +0200
committerWilly Micieli <micieli@laposte.net>2019-10-26 16:58:27 +0200
commitfc8879ac5b7d6f1c00012919cb718ba4cd298832 (patch)
tree20c57edef9b3843d287a006661c101a78f01887b
parent56a8ff44183b593256d15e56c110fcc6f84dccec (diff)
downloadimperium-fc8879ac5b7d6f1c00012919cb718ba4cd298832.zip
imperium-fc8879ac5b7d6f1c00012919cb718ba4cd298832.tar.gz
fix locale bug
-rw-r--r--imperium/View/View.php10
1 files changed, 3 insertions, 7 deletions
diff --git a/imperium/View/View.php b/imperium/View/View.php
index 6acd7b5..c278dc6 100644
--- a/imperium/View/View.php
+++ b/imperium/View/View.php
@@ -5,6 +5,7 @@
use DI\DependencyException;
use DI\NotFoundException;
+ use Imperium\Cookies\Cookies;
use Imperium\Exception\Kedavra;
use Imperium\Flash\Flash;
use Sinergi\BrowserDetector\Os;
@@ -99,8 +100,7 @@
$this->twig->addExtension(new ArrayExtension());
$this->twig->addExtension(new TranslationExtension());
-
-
+
$this->loader()->addPath($views_path . DIRECTORY_SEPARATOR . 'crud', 'crud');
$this->loader()->addPath($views_path . DIRECTORY_SEPARATOR . 'todo', 'todo');
@@ -208,7 +208,6 @@
*/
public function twig() : Environment
{
-
return $this->twig;
}
@@ -236,7 +235,6 @@
*/
public function loader() : FilesystemLoader
{
-
return $this->loader;
}
@@ -244,13 +242,11 @@
* @return string
*
* @throws Kedavra
- * @throws DependencyException
- * @throws NotFoundException
*
*/
public function locale() : string
{
- return app()->lang();
+ return (new Cookies())->get('locale', config('locales', 'locale'));
}
/**