ej2-react-ui-components icon indicating copy to clipboard operation
ej2-react-ui-components copied to clipboard

Wrong ISO culture format for the schedulder

Open jeremyb35 opened this issue 1 year ago • 2 comments

Locale to be used are those of ISO 639-1 and ISO 3166-1 alpha-2 (like fr-CH, en-GB, en-US. etc...).

Except for French, it just need the language name without the country code: fr instead of fr-FR. With fr-FR it return the following error : Cannot read properties of undefined (reading 'trim')

jeremyb35 avatar Sep 23 '24 14:09 jeremyb35

Hi @jeremyb35,

The Scheduler has processed the culture code using the CLDR data. However, the fr-FR culture code is not included in the CLDR data package. As a result, the Scheduler generates an error when attempting to use the fr-FR culture code.

VengateshManiraj avatar Oct 09 '24 10:10 VengateshManiraj

Hi,

Thank you for your explanation regarding the use of CLDR data in the Scheduler component.

However, I would like to suggest implementing full support for BCP 47 locale codes (e.g., fr-FR, en-GB, es-MX, etc.) rather than relying on a limited subset of CLDR locales.

Currently, using a standard locale such as fr-FR results in an error because the data is not included in the provided CLDR package. This makes it difficult to work with internationalization in applications that require region-specific formats and translations.

Specifically, I would recommend:

  1. Loading or providing access to the complete CLDR locale data, or at least documenting a clear way for developers to import additional locales themselves.
  2. Implementing a fallback mechanism: when a specific locale like fr-FR is not available, the system should gracefully fallback to the base language fr instead of throwing runtime errors.
  3. Improving the documentation to clarify which locales are supported out of the box, and how to extend the localization support when needed.

Full support for locale codes would make the Scheduler much more flexible and compliant with common internationalization standards.

Thanks for considering this feature enhancement! Looking forward to your feedback.

Best regards,

jeremyb35 avatar Mar 24 '25 14:03 jeremyb35