-$store = new $storage_type();
-# initialisation de RainTPL
-raintpl::$tpl_dir = './tpl/';
-raintpl::$cache_dir = './cache/';
-raintpl::$base_url = get_poche_url();
-raintpl::configure('path_replace', false);
-raintpl::configure('debug', false);
-$tpl = new raintpl();
+# i18n
+putenv('LC_ALL=' . LANG);
+setlocale(LC_ALL, LANG);
+bindtextdomain(LANG, LOCALE);
+textdomain(LANG);
+
+# template engine
+Twig_Autoloader::register();
+$loader = new Twig_Loader_Filesystem(TPL);
+$twig = new Twig_Environment($loader, array(
+ 'cache' => CACHE,
+));
+$twig->addExtension(new Twig_Extensions_Extension_I18n());
+
+Session::init();
+$store = new $storage_type();