1
0
mirror of https://github.com/typemill/typemill.git synced 2025-07-14 02:56:20 +02:00

Version 1.3.7: Theme Cyanine and Notice Component

This commit is contained in:
trendschau
2020-06-11 09:45:32 +02:00
parent 021f487fe7
commit 53dd14fd8b
86 changed files with 1532 additions and 3067 deletions

View File

@ -218,22 +218,22 @@ $container['view'] = function ($container)
$view->getEnvironment()->addGlobal('assets', $container->assets);
/******************************
* LOAD TRANSLATIONS *
******************************/
$uri = $_SERVER['REQUEST_URI'];
if(isset($uri) && (strpos($uri,'/tm/') !== false OR strpos($uri,'/setup') !== false))
{
// Admin environment labels
$labels = Typemill\Translations::loadTranslations('admin');
} else {
// User environment labels
// For now it is useless, but it will prove useful in the future
$labels = Typemill\Translations::loadTranslations('user');
}
$container['translations'] = $labels;
$view['translations'] = $labels;
$view->addExtension(new Typemill\Extensions\TwigLanguageExtension( $labels ));
/******************************
* LOAD TRANSLATIONS *
******************************/
$uri = $_SERVER['REQUEST_URI'];
if(isset($uri) && (strpos($uri,'/tm/') !== false OR strpos($uri,'/setup') !== false))
{
// Admin environment labels
$labels = Typemill\Translations::loadTranslations('admin');
} else {
// User environment labels
// For now it is useless, but it will prove useful in the future
$labels = Typemill\Translations::loadTranslations('user');
}
$container['translations'] = $labels;
$view['translations'] = $labels;
$view->addExtension(new Typemill\Extensions\TwigLanguageExtension( $labels ));
return $view;
};