How to define correct ISO-Code?

Questions around the TYPO3 integration and plugins
Forum rules
Always add your TYPO3, Aimeos and PHP version as well as your environment (Linux/Mac/Win)
Spam and unrelated posts will be removed immediately!
User avatar
alexkereszturi
Posts: 8
Joined: 24 Dec 2024, 11:16

How to define correct ISO-Code?

Post by alexkereszturi » 27 Jan 2025, 02:59

Definig a language in the backend needs the ISO-code in "de_CH" Format. (001.png)
Trying to save it as "de-CH" delivers an error: 002.png

But "de_CH" invokes an error "Incorrect locale information provided" in basket-mini.js (003.png) which might be explainable as https://developer.mozilla.org/en-US/doc ... mberFormat defines ISO-Codes with "-" and not with "_" => "de-CH" instead of "de_CH".

How can I get the basket-mini.js running again with "de_CH" ?
Attachments
003.png
003.png (79.24 KiB) Viewed 21485 times
002.png
002.png (68.94 KiB) Viewed 21485 times
001.png
001.png (75.26 KiB) Viewed 21485 times

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

Re: How to define correct ISO-Code?

Post by aimeos » 27 Jan 2025, 14:49

HTML defines a different separator than the ISO codes. To fix that change the line to:

Code: Select all

currency: attr['order.currencyid'].replace(/_/g, '-'),
We've done that in the core files too now.
Professional support and custom implementation are available at Aimeos.com
If you like Aimeos, Image give us a star

Post Reply