public function kernelView(GetResponseForControllerResultEvent $event)
    {
        $request = $event->getRequest();

        if (!$request->query->has('locale')) {
            return;
        }

        $controllerResult = $event->getControllerResult();
        $locale = $request->query->get('locale');

        if ($controllerResult instanceof Paginator || is_array($controllerResult)) {
            foreach ($controllerResult as $model) {
                if ($model instanceof Localizable) {
                    $this->localeService->localize($model, $locale);
                }
            }
        } elseif ($controllerResult instanceof Localizable) {
            $this->localeService->localize($controllerResult, $locale);
        }

        $event->setControllerResult($controllerResult);
    }