I've created a custom field formatter widget for numeric fields. The formatter has A LOT of settings to customize the visual output of that number, to whatever designers/marketing wants (adding a lot of HTML markup, with[out] leading/trailing zeros, zeros as dash, one or two fractions, rounding, prefixes/infixes/suffixes,... ). Some of those settings are language-dependant though, so I'd like to enter different formatter settings in
/en/admin/structure/types/manage/MY_CONTENT_TYPE/display /de/admin/structure/types/manage/MY_CONTENT_TYPE/display /fr/admin/structure/types/manage/MY_CONTENT_TYPE/display
I've noticed that there is a
$langcode parameter in
FormatterInterface::viewElements(FieldItemListInterface $items, $langcode)
but I don't know how to make
FormatterInterface.php FormatterInterface::settingsForm(array $form, FormStateInterface $form_state)
Is it possible at all to have language-specific settings in a field formatter? If yes, how to I store and retrieve those settings in the correct language?