[Kassa Compleet] What is the right format of a customer's locale in a «POST /v1/orders/» request?

As you can see in the JSON Schema of a «POST /v1/orders/» request, the customer/locale property has the following specification:

"locale": {
	"description": "POSIX locale without codeset and modifier",
	"type": ["string", "null"],
	"pattern": "^[a-zA-Z]{2}(_[a-zA-Z]{2})?$"
}

So the following values are correct:

  • nl
  • NL
  • nl_nl
  • nl_NL

And even:

  • nL
  • Nl
  • nL_nL
  • Nl-nL

end so on.

The official Kassa Compleet extrension for Magento 1.x always uses the nl_NL format because of using the standard Mage_Core_Model_Locale::getLocaleCode() method: