Skip to content

Currency symbol loaded from another locale than defined in store #37780

Open
@ivanko-dev

Description

@ivanko-dev

Preconditions and environment

Magento version 2.4.6-p1

Application configured to de_DE locale and have different currencies data displayed on pages. The expected currency symbol for MXN (Mexican peso) is "MX$", but "$" is displayed on pages.

Magento uses symfony/intl extension now to load locales specific data instead of magento/zendframework1 used before. The logic for currencies data loading is implemented in \Magento\Framework\Currency\Data\Currency. As result method responsible for loading currency symbol (\Magento\Framework\Currency\Data\Currency::getSymbol LIne 250) uses hardcoded locales for specific currencies (\Magento\Framework\Currency\Data\Currency::$displayLocale Line 53) to change locale on symbol loading (Line 258).

In this way currency symbol is loaded using another locale es_MX (vendor/symfony/intl/Resources/data/currencies/es_MX.php) than defined in the store configuration de_DE (vendor/symfony/intl/Resources/data/currencies/de.php)

Steps to reproduce

Display MXN, MAD, SAR, BHD, ... currency for de_DE locale in store.

Expected result

Currency symbol from vendor/symfony/intl/Resources/data/currencies/de.php (for de_DE locale) shown.

Actual result

Currency symbol from another locale displayed.

Additional information

No response

Release note

No response

Triage and priority

  • Severity: S0 - Affects critical data or functionality and leaves users without workaround.
  • Severity: S1 - Affects critical data or functionality and forces users to employ a workaround.
  • Severity: S2 - Affects non-critical data or functionality and forces users to employ a workaround.
  • Severity: S3 - Affects non-critical data or functionality and does not force users to employ a workaround.
  • Severity: S4 - Affects aesthetics, professional look and feel, “quality” or “usability”.

Metadata

Metadata

Assignees

No one assigned

    Labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions