<commit_before><?php

namespace Frontend\Core\Engine;

use Common\Core\Twig\BaseTwigTemplate;
use Common\Core\Twig\Extensions\TwigFilters;
use Symfony\Bridge\Twig\Form\TwigRendererEngine;
use Symfony\Component\Config\FileLocatorInterface;
use Symfony\Component\Filesystem\Filesystem;
use Symfony\Bridge\Twig\Extension\FormExtension as SymfonyFormExtension;
use Symfony\Component\Form\FormRenderer;
use Symfony\Component\Templating\TemplateNameParserInterface;
use Twig_Environment;
use Twig_FactoryRuntimeLoader;

/**
 * This is a twig template wrapper
 * that glues spoon libraries and code standards with twig
 */
class TwigTemplate extends BaseTwigTemplate
{
    /**
     * @var string
     */
    private $themePath;

    public function __construct(
        Twig_Environment $environment,
        TemplateNameParserInterface $parser,
        FileLocatorInterface $locator
    ) {
        $container = Model::getContainer();
        $this->forkSettings = $container->get('fork.settings');

        parent::__construct($environment, $parser, $locator);

        $this->debugMode = $container->getParameter('kernel.debug');
        if ($this->debugMode) {
            $this->environment->enableAutoReload();
            $this->environment->setCache(false);
        }
        $this->environment->disableStrictVariables();
        new FormExtension($this->environment);<commit_msg>Updated Twigtemplate so language gets set<commit_after><?php

namespace Frontend\Core\Engine;

use Frontend\Core\Language\Locale;
use Common\Core\Twig\BaseTwigTemplate;
use Common\Core\Twig\Extensions\TwigFilters;
use Symfony\Bridge\Twig\Form\TwigRendererEngine;
use Symfony\Component\Config\FileLocatorInterface;
use Symfony\Component\Filesystem\Filesystem;
use Symfony\Bridge\Twig\Extension\FormExtension as SymfonyFormExtension;
use Symfony\Component\Form\FormRenderer;
use Symfony\Component\Templating\TemplateNameParserInterface;
use Twig_Environment;
use Twig_FactoryRuntimeLoader;

/**
 * This is a twig template wrapper
 * that glues spoon libraries and code standards with twig
 */
class TwigTemplate extends BaseTwigTemplate
{
    /**
     * @var string
     */
    private $themePath;

    public function __construct(
        Twig_Environment $environment,
        TemplateNameParserInterface $parser,
        FileLocatorInterface $locator
    ) {
        $container = Model::getContainer();
        $this->forkSettings = $container->get('fork.settings');
        $this->language = Locale::frontendLanguage();

        parent::__construct($environment, $parser, $locator);

        $this->debugMode = $container->getParameter('kernel.debug');
        if ($this->debugMode) {
            $this->environment->enableAutoReload();
            $this->environment->setCache(false);
        }
        $this->environment->disableStrictVariables();
        new FormExtension($this->environment);
{'fraction_non_alphanumeric': 0.10871830496700244, 'fraction_numerical': 0.0, 'mean_word_length': 3.923076923076923, 'pattern_counts': {'":': 0, '<': 5, '<?xml version=': 0, '>': 28, 'https://': 0, 'lorem ipsum': 0, 'www.': 0, 'xml': 0}, 'pii_count': 0, 'substrings_counts': 0, 'word_list_counts': {'cursed_substrings.json': 0, 'profanity_word_list.json': 0, 'sexual_word_list.json': 0, 'zh_pornsignals.json': 0}}
{'dir': 'git-commits-cleaned', 'id': '400536', 'n_tokens_mistral': 793, 'n_tokens_neox': 782, 'n_words': 154}