Persian date format (using Globalization and Internationalization)

0 Answers 237 Views
TreeList
Farouq
Top achievements
Rank 1
Farouq asked on 19 Sep 2022, 05:58 PM

Hi

I'm trying to show dates in Persian format in my component.

I have installed all required cldr-... packages, but the output is just "Object".(a text reading as Object)

I tried this code sample https://stackblitz.com/run/?file=app%2Fmain.jsx which I found in your documents

but received an error :

Error in /turbo_modules/@progress/kendo-intl@3.1.1/dist/npm/main.js (2361:13)

calendar.patterns is undefined

Would appreciate your help.

Wissam
Telerik team
commented on 20 Sep 2022, 08:58 AM

Hi Farouq,

Unfortunately, your Stackblitz example can not be opened. Can I ask you to send it again after forking it, so we could be able to debug the exact issue?

I have also prepared a demonstration on how to import the `cldr-package` for the Persian date format:

https://stackblitz.com/edit/react-rt2bfp?file=app%2Fmain.jsx 

`Ca-gregorian` is a standard calendar, and it is the name of the JSON package. The only change is the locale name.

For example: `cldr-dates-full/main/en-GB/ca-gregorian.json` becomes `cldr-dates-full/main/fa/ca-gregorian.json`

For more information about internationalization, the ca-gregorian calendar, and the cldr-package, please refer to the following pages:

https://www.telerik.com/kendo-react-ui/components/intl/i18n/ 

https://en.wikipedia.org/wiki/Gregorian_calendar 

https://www.npmjs.com/package/cldr-core 

I hope this matches what you need, but please let us know if you this example doesn't match your use case or if you need more assistance.

Regards,
Wissam
Progress Telerik

No answers yet. Maybe you can help?

Tags
TreeList
Asked by
Farouq
Top achievements
Rank 1
Share this question
or