public function formatPrice($price) {
    // Fetch the config.
    $config = $this->configFactory->get('acm.currency');

    // Get currency with the correct locale.
    $locale = \Drupal::languageManager()->getCurrentLanguage()->getId();
    $currency = \Drupal::service('repository.currency');
    $numberFormat = \Drupal::service('repository.number_format');
    $currencyFormatter = new CurrencyFormatter($numberFormat, $currency, ['locale' => $locale]);

    $currencyCode = $currency->get($config->get('currency_code'))->getCurrencyCode();

    return $currencyFormatter->format($price, $currencyCode);
  }