File tree 2 files changed +14
-6
lines changed
2 files changed +14
-6
lines changed Original file line number Diff line number Diff line change @@ -52,9 +52,13 @@ $twigLoader = new FilesystemLoader('./tpl/');
52
52
$twig = new Environment($twigLoader, $twigConfig);
53
53
54
54
// this is for the filter |trans
55
- $filter = new TwigFilter('trans', function ($context, $string) {
56
- return Translation::TransGetText($string, $context);
57
- }, ['needs_context' => true]);
55
+ $filter = new TwigFilter(
56
+ 'trans',
57
+ function ($context, $string) {
58
+ return Translation::transGetText($string, $context);
59
+ },
60
+ ['needs_context' => true]
61
+ );
58
62
$twig->addFilter($filter);
59
63
60
64
// load the i18n extension for using the translation tag for twig
Original file line number Diff line number Diff line change 32
32
$ twig = new Environment ($ twigLoader , $ twigConfig );
33
33
34
34
// this is for the filter |trans
35
- $ filter = new TwigFilter ('trans ' , function ($ context , $ string ) {
36
- return Translation::transGetText ($ string , $ context );
37
- }, ['needs_context ' => true ]);
35
+ $ filter = new TwigFilter (
36
+ 'trans ' ,
37
+ function ($ context , $ string ) {
38
+ return Translation::transGetText ($ string , $ context );
39
+ },
40
+ ['needs_context ' => true ]
41
+ );
38
42
$ twig ->addFilter ($ filter );
39
43
40
44
// load the i18n extension for using the translation tag for twig
You can’t perform that action at this time.
0 commit comments