How do I retrieve a plugin block field's translated value? I created a module that installs a block with some fields when installed. I added a schema file, and altered the blockSubmit() function so that the translation is saved in the schema.
Here is my module.schema.yml:
block.settings.worldwide:
  type: block_settings
  label: 'Worldwide'
  mapping:
    overtitle:
      type: label
      label: 'Overtitle'

Here is the blockSubmit() function from my Block plugin:
public function blockSubmit($form, FormStateInterface $form_state) {
    parent::blockSubmit($form, $form_state);
    $values = $form_state-&gt;getValues();
    $block_name = $this-&gt;getPluginId();

    $this-&gt;blockConfigFactory-&gt;setBlockConfig($block_name, 'overtitle', $values['overtitle']);
    $this-&gt;setConfigurationValue('overtitle', $values['overtitle']);
}

When saving, I have no error, and can translate the field, which will keep the translation when updated. So everything seems to work. Additionnally, the website displays correctly what I saved for the default language.
Now, let's say that the default language is english and the alternative is french. My issue is that if I set the website in french, the default (english) value will keep displaying.
However, I can't figure out a way to displayed the saved translation when I want to look at the block in a language that has the block's translation saved. I have no idea where to look, and can't seem to find relevant stuff on internet.
Thank you in advance
Little did I know, the translation was correctly loaded, but not used in the twig files. Both the fields' content and configuration were loaded, were content was ie an image and a link, and configuration the field's translation.
Somehow, still, the configuration needed several cache rebuilds to show up, but then went ok and kept being updated if I made any modifications.
The twig files were using variables such as {{ content['field_worldwide_text'] }}, so I needed it to use config[] instead.
Additional notes for future self, here is how to load content and configuration:
$content = $this-&gt;blockConfigFactory-&gt;getBlockConfig($this-&gt;getPluginId());
$config = $this-&gt;getConfiguration();