Skip to content

Commit

Permalink
The |excerpt filter returns the excerpt in the correct locale
Browse files Browse the repository at this point in the history
  • Loading branch information
I-Valchev committed Mar 18, 2021
1 parent 0753739 commit 5969853
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion src/Twig/ContentExtension.php
Original file line number Diff line number Diff line change
Expand Up @@ -255,7 +255,7 @@ public function getExcerpt($content, int $length = 280, bool $includeTitle = fal
}

if (ContentHelper::isSuitable($content, 'excerpt_format')) {
$excerpt = $this->contentHelper->get($content, $content->getDefinition()->get('excerpt_format'));
$excerpt = $this->contentHelper->get($content, $content->getDefinition()->get('excerpt_format'), $this->request->getLocale());
} else {
$excerpt = $this->getFieldBasedExcerpt($content, $length, $includeTitle);
}
Expand Down

0 comments on commit 5969853

Please sign in to comment.