Skip to content

Commit

Permalink
Merge tag v2.3.25 into develop
Browse files Browse the repository at this point in the history
  • Loading branch information
roadiz-ci committed Aug 26, 2024
1 parent 8939cf3 commit f9dd806
Showing 1 changed file with 9 additions and 0 deletions.
9 changes: 9 additions & 0 deletions src/Api/Controller/GetWebResponseByPathController.php
Original file line number Diff line number Diff line change
Expand Up @@ -134,6 +134,15 @@ protected function normalizeResourcePath(?Request $request, string $path): Persi

$this->addResourceToCacheTags($request, $resource);

// Set translation and locale to be used in Request context
if (null !== $resourceInfo->getTranslation()) {
$request->attributes->set('_translation', $resourceInfo->getTranslation());
}

if (null !== $resourceInfo->getLocale()) {
$request->attributes->set('_locale', $resourceInfo->getLocale());
}

/*
* Or plain entity
*/
Expand Down

0 comments on commit f9dd806

Please sign in to comment.