Skip to content

Commit

Permalink
Merge pull request #2475 from bolt/bugfix/excerpt-in-correct-locale
Browse files Browse the repository at this point in the history
The `|excerpt` filter returns the excerpt in the correct locale
  • Loading branch information
bobdenotter committed Mar 21, 2021
2 parents 751aa62 + 5969853 commit 507b0a1
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 507b0a1

Please sign in to comment.