Custom CLDR locale

Hi,

Is there a way to create a custom model for CLDR locale? I have the case for en_CH and en_AT and I’m ending up with the following error:

Basically I’m calling:
$this->cldrRepository->getModelForLocale($locale);
with the locale ‘de_CH’

Anyone? Let me know if you need more info. I’m using Flow 5.3

The CLDR/Sources is basically a git clone of https://github.com/unicode-org/cldr/tree/master/common which will only ever cover valid well-known locales. So you need to add custom CLDR data for your custom locales.

But may I ask why you need en_CH? That would mean english as spoken in switzerland which is… awkward.

Yep, I got how it’s working (that it’s standardized), but how do I add custom CLDR data is the question?
Adding to Settings.yaml these lines won’t do:

Neos:
  Flow:
    i18n:
      defaultLocale: de_DE
      scan:
        includePaths:
          '/Private/i18n/CLDR/': true

Looking at the CldrModel.php the base path is hardcoded so I don’t see how this could be altered or complimented with another path for models:
protected $cldrBasePath = 'resource://Neos.Neos/Private/I18n/CLDR/Sources/';

To answer, your question - clients. This is the case that I have. It’s exactly English for Switzerland.

To answer, your question - clients. This is the case that I have. It’s exactly English for Switzerland.

Clients requirements never fail to amaze me :smiley:

but how do I add custom CLDR data is the question?

It’s not doable by configuration, you basically would need to manually add files in the Neos I18n/CLDR/Sources/ folder, which means updating will be a hazzle.

The Neos.Flow.i18n.scan.includePaths setting is only for scanning your application resources for “available locales” by checking localizes resources or translation XML files. It’s not to add localization data, as that was never expected to be a usecase.

Exactly what my understanding was. And yet, even before posting here I added en_CH.xml and all worked out fine, but wanted to avoid that if there was a better way.
I guess I’ll go with this solution. Thank you for confirming this!