diff --git a/modules/oe_whitelabel_paragraphs/oe_whitelabel_paragraphs.module b/modules/oe_whitelabel_paragraphs/oe_whitelabel_paragraphs.module index 845de48fa..f94197ff4 100644 --- a/modules/oe_whitelabel_paragraphs/oe_whitelabel_paragraphs.module +++ b/modules/oe_whitelabel_paragraphs/oe_whitelabel_paragraphs.module @@ -234,9 +234,11 @@ function oe_whitelabel_preprocess_paragraph__oe_list_item_block(array &$variable $variables['columns'] = ['two_columns' => '2', 'three_columns' => '3'][$layout_name] ?? '1'; $variables['items'] = []; - foreach ($variables['paragraph']->get('field_oe_paragraphs') as $card_paragraph_item) { + foreach ($variables['paragraph']->get('field_oe_paragraphs') as $sub_paragraph) { /** @var \Drupal\paragraphs\ParagraphInterface $card_paragraph */ - $card_paragraph = $card_paragraph_item->entity; + // Get the paragraph translation. + $card_paragraph = \Drupal::service('entity.repository') + ->getTranslationFromContext($sub_paragraph->entity, $paragraph->language()->getId()); $card_image_item = $card_paragraph->get('field_oe_image')->first(); $card_image = $card_image_item ? ImageValueObject::fromImageItem($card_image_item) : NULL;