Problem with locale

Hi, I'm using `"@syncfusion/ej2-angular-calendars": "^19.3.44",` in

"@angular/core": "~11.1.2".


I want to set locale in 'ko', But got an error message like 'ERROR TypeError: Cannot convert undefined or null to object'.


I installed 'cldr-data', and here is my code.


```

import { loadCldr, L10n } from '@syncfusion/ej2-base';

import * as numberingSystems from 'cldr-data/supplemental/numberingSystems.json';

import * as gregorian from 'cldr-data/main/ko/ca-gregorian.json';

import * as numbers from 'cldr-data/main/ko/numbers.json';

import * as timeZoneNames from 'cldr-data/main/ko/timeZoneNames.json';


loadCldr(numberingSystems, gregorian, numbers, timeZoneNames);


@Component({

// …

})

export class MyComponent implements OnInit, OnDestroy {

// …


ngOnInit(): void {

  L10n.load({

    ko: {

      calendar: { today: '오늘' },

    },

  });

}

 }

```


And my template code as below:

```

<ejs-calendar

  [formControl]="datesFormControl"

  [isMultiSelection]="multiSelect"

  [showTodayButton]="false"

  [min]="minDate"

  (renderDayCell)="disabledDate($event)"

  locale="ko"

></ejs-calendar>

```


I already done with removing my node_modules and reinstall, but still having a same issue.


Hope to get an answer soon!

Thanks.



1 Reply

BC Berly Christopher Syncfusion Team October 21, 2021 02:14 PM UTC

Hi Kim MJ, 
  
Greetings from Syncfusion support. 
  
We have checked the shared code snippet. The reported issue will be occurred if the CLDR-data not loaded in the application. So, we suggest you to ensure that the CLDR-data are loaded correctly in the application. 
  
Else, the Syncfusion packages will be installed with duplicate package. So, we suggest you to follow the below steps to remove the duplicate packages in the application. 
  
·       Delete the node_modules and package-lock.json file 
·       Clear the NPM cache with help of “npm cache clean --force”. 
·       Run the “npm install” command to install the package. 
·       Then run “npm dedupe” command to remove the duplicate packages. 
  
Please refer the below documentation to know more about this. 
  
For your reference, we have prepared the sample and attached it below. 
  
Screenshot: 
  
 
  
Still issue persists, please share the issue reproducing sample that will help us check and proceed further from our end. 
  
Regards, 
Berly B.C 


Loader.
Up arrow icon