Get prefix and suffix from a Number field So here is my issue;

I got a price in a Number (decimal) field in a node, I need to process this number in some ways depending on users interactions then send it back (via an ajax request) as an integer, but also formatted with proper currency sign which is stored in the fields prefix/suffix settings.

I should mention that this should also work with translations of the price and its prefix/suffixes.

I get the price now this way;

$node = \Drupal::entityTypeManager()-&gt;getStorage('node')-&gt;load($node_id);
$language = \Drupal::languageManager()-&gt;getCurrentLanguage()-&gt;getId();
$translated_node = $node-&gt;getTranslation($language);
$price = $translated_node-&gt;get('field_price')-&gt;getValue()[0]['value'];`


So now I want to constuct a formated variable with the translated prefix/suffix depending on which language is curretly selected.
After some trial and error and cache problems I found the answer to this myself. Here is how I got the prefix/suffix;

$prefix = $translated_node-&gt;get('field_price')-&gt;getSettings()['prefix'];
$suffix = $translated_node-&gt;get('field_price')-&gt;getSettings()['suffix'];