Unable to localize to Hungarian

I am trying to localize my ASP.NET Core project to Hungarian, currently it only contains a Scheduler component, which was working without localization:

<ejs-schedule id="schedule"
        currentView="Month"
        startHour="05:00"
        endHour="20:00">
    <e-schedule-eventsettings datasource="Model.Occasions"></e-schedule-eventsettings>
    <e-schedule-views>
        <e-schedule-view option="Week"></e-schedule-view>
        <e-schedule-view option="Month"></e-schedule-view>
        <e-schedule-view option="Agenda"></e-schedule-view>
    </e-schedule-views>
</ejs-schedule>

I was following these instructions: https://ej2.syncfusion.com/aspnetcore/documentation/common/localization

Downloaded the hu.json file from https://github.com/syncfusion/ej2-locale/blob/master/src/hu.json, and placed it at wwwroot/locale.

Added it to the end of _Layout.cshtml body:

    <script>
        fetch('@Url.Content("~/locale/hu.json")')
        .then(r => r.json())
        .then(locale => {
          ej.base.L10n.load(locale);
          ej.base.setCulture('hu');
        })
        .catch(() => console.warn('Could not load Syncfusion locale'));
    </script>


     <!-- Syncfusion ASP.NET Core Script Manager -->
    <ejs-scripts></ejs-scripts>

Now the component just keeps loading:

Image_5286_1771151203489

In Console, I see the following exception: ej2.min.js:10 Uncaught TypeError: Cannot convert undefined or null to object

Chrome locates it here:

    _Ue.prototype.getDayNames = function(e) {
        for (var t = [], i = Ue(this.locale) || "en" === this.locale || "en-US" === this.locale ? R("days.stand-alone." + e, Ti(this.getCalendarMode())) : R("main." + this.locale + ".dates.calendars." + this.getCalendarMode() + ".days.format." + e, Bi), n = 0, o = Object.keys(i); n < o.length; n++) {
            var r = o[n];
            t.push(R(r, i))
        }
        return t
    }

It makes sense, as in hu.json, there is no dates section at all for anything like main.hu.dates.calendars.gregorian.days.format.wide.

What am I doing wrong?


1 Reply 1 reply marked as answer

VR Vijayakumar Rajasekar Syncfusion Team February 16, 2026 05:14 PM UTC

Hi Péter Szkupien,

Thank you for reaching out to syncfusion support.
We reviewed your query regarding not able to localize scheduler to Hungarian. Based on your scheduler configurations and script references, we identified that you loaded hu.json from the Syncfusion ej2-locale repo. But the Scheduler needs CLDR date/number data (like main/hu/ca-gregorian.json, numbers.json, timeZoneNames.json, and supplemental files).
To load the CLDR culture data follow the below steps:
1. Install CLDR data from cldr-data npm package
npm install cldr-data --save
Put the below files in wwwroot/cldr-data
/cldr-data/supplemental/numberingSystems.json
/cldr-data/supplemental/weekData.json
/cldr-data/supplemental/currencyData.json
/cldr-data/main/hu/ca-gregorian.json
/cldr-data/main/hu/numbers.json
/cldr-data/main/hu/timeZoneNames.json
2. Keep your hu.json in wwwroot/locale/hu.json.
3. In _Layout.cshtml add the below scripts
 <script>
     function getJSON(path) { return fetch(path).then(r => r.json()); }
     // Load CLDR files required by EJ2 (dates, numbers, time zones, supplemental)
     Promise.all([
       getJSON('@Url.Content("~/cldr-data/supplemental/numberingSystems.json")'),
       getJSON('@Url.Content("~/cldr-data/main/hu/ca-gregorian.json")'),
       getJSON('@Url.Content("~/cldr-data/main/hu/numbers.json")'),
       getJSON('@Url.Content("~/cldr-data/main/hu/timeZoneNames.json")'),
       getJSON('@Url.Content("~/cldr-data/supplemental/weekData.json")'),
       getJSON('@Url.Content("~/cldr-data/supplemental/currencyData.json")')
     ]).then(function (cldrData) {
       ej.base.loadCldr.apply(this, cldrData);
       // Load Syncfusion localized component strings
       return getJSON('@Url.Content("~/locale/hu.json")');
     }).then(function (locale) {
       ej.base.L10n.load(locale);
       ej.base.setCulture('hu');
     }).catch(function (e) {
       console.warn('Localization/CLDR loading failed', e);
     });
 </script>

Documentation: Localization in ASP.NET CORE Schedule Control | Syncfusion

Please find the attached sample that we created based on your scenario.
Kindly get back us if you need any further assistance.


Regards,

Vijayakumar R


Attachment: Localle_Core_c319e94d.zip

Marked as answer
Loader.
Up arrow icon