public function translateAction(Request $request, $locale, $domain = null)
    {
        $queryIds = $request->query->get('id');

        if ($domain) {
            if ($queryIds) {
                if (!is_array($queryIds)) {
                    $queryIds = [$queryIds];
                }

                $translations = $this->getTranslationsForDomainAndIds($locale, $domain, $queryIds);
            } else {
                $translations = $this->getTranslationsForDomain($locale, $domain);
            }
        } else {
            $translations = $this->getTranslationsForLocale($locale);
        }

        return new JsonResponse(
            $translations
        );
    }