currency format not working

Help for integrating the Laravel package
Forum rules
Always add your Laravel, Aimeos and PHP version as well as your environment (Linux/Mac/Win)
Spam and unrelated posts will be removed immediately!
carlos_valdes
Posts: 8
Joined: 22 Apr 2020, 23:46

currency format not working

Post by carlos_valdes » 05 Jun 2020, 16:44

Hi, i have a problem displaying MXN peso format.
the correct format is like this $ 1,000,000.00
but prices continue to display as
$1.000.000.00

here is my config:

'i18n' => [
'es' => [
'currency' => [
'MXN' => '$',
],
'client/code' => [
'price:default' => ['%2$s %1$s'],
'%1$s %2$s' => ['%2$s %1$s'],
],
'client' => [
'%1$s %2$s' => ['%2$s %1$s']
]
],
],

User avatar
aimeos
Administrator
Posts: 7836
Joined: 01 Jan 1970, 00:00

Re: currency format not working

Post by aimeos » 06 Jun 2020, 10:40

The number format depends on the language and the PHP locale based number formatter uses the european number format for "es". You should add "es_MX" as language in the "Locale -> Language" panel in the admin interface and use it in the "Locale -> Locale" panel instead of "es". Then it should work.
Professional support and custom implementation are available at Aimeos.com
If you like Aimeos, Image give us a star

carlos_valdes
Posts: 8
Joined: 22 Apr 2020, 23:46

Re: currency format not working

Post by carlos_valdes » 07 Jun 2020, 03:11

Perfect, solved! :D

Post Reply