Switch to symfony/translation for translations (#250)
This commit is contained in:
parent
0b1ce90f47
commit
a5bd827d21
16 changed files with 399 additions and 212 deletions
|
@ -35,9 +35,12 @@ class ViewFactory
|
|||
$request = $request->withUri($request->getUri()->withScheme('https')->withPort(443));
|
||||
}
|
||||
|
||||
$localeManager = $container['locale'];
|
||||
|
||||
$smartyPlugins = new SmartyPlugins($container['router'], $request->getUri()->withUserInfo(null));
|
||||
$view->registerPlugin('function', 'path_for', [$smartyPlugins, 'pathFor']);
|
||||
$view->registerPlugin('function', 'base_url', [$smartyPlugins, 'baseUrl']);
|
||||
$view->registerPlugin('block', 't', [$localeManager, 'smartyTranslate']);
|
||||
|
||||
return $view;
|
||||
}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue