This is a migrated thread and some comments may be shown as answers.

kendo-intl package problems

4 Answers 2009 Views
General Discussions
This is a migrated thread and some comments may be shown as answers.
Pera
Top achievements
Rank 1
Pera asked on 08 May 2018, 03:09 PM

Hi,

I have problem with kendo-intl package, whenever I try to use IntlService or to load locale other than default one my application hangs on start-up without any error in console.

I have also tried to use cldr-data (instead of kendo-intl) but same problem occurred.

Btw, I am using system.js for my project.

Any ideas?

4 Answers, 1 is accepted

Sort by
0
Svet
Telerik team
answered on 10 May 2018, 11:53 AM
Hi Pera,

I am not sure what may be causing the issue.

Check that the project uses the latest version of the IntlModule - 1.4.1:

https://www.telerik.com/kendo-angular-ui/components/internationalization/changelog/

Also check the following stack blitz example that demonstrates how to change the locale dynamically using the intlService:

https://stackblitz.com/edit/kendo-grouped-grid-3-e4htpe

I would also like to add that it is considered a best practice to use the CLI tool for Angular projects as it provides all base configurations out of the box.

I hope this helps. 

Regards,
Svetlin
Progress Telerik
Try our brand new, jQuery-free Angular components built from ground-up which deliver the business app essential building blocks - a grid component, data visualization (charts) and form elements.
0
Pera
Top achievements
Rank 1
answered on 31 May 2018, 12:57 PM

Hi Svetlin,
thank you for reply,

I have tried with various versions of IntlModule (from 1.1.x to 1.4.1) without any success.
In this project I do not get any useful error message for this issue, so I have created a new one based on
https://www.telerik.com/kendo-angular-ui/components/installation/dotnet-core/

so now I have CLI based project andI have applied sample for localization like in

https://www.telerik.com/kendo-angular-ui/components/internationalization/locale-changes/

 

and now I have an error

Microsoft.AspNetCore.NodeServices.HostingModels.NodeInvocationException: Prerendering failed because of error: [removed]\ClientApp\node_modules\@progress\kendo-angular-intl\locales\en\calendar.js:1
(function (exports, require, module, __filename, __dirname) { import { setData } from '@progress/kendo-angular-intl';
                                                              ^^^^^^

 

so now I know that problem is related to following lines (located in app.module.ts)

import "@progress/kendo-angular-intl/locales/en/all";
import "@progress/kendo-angular-intl/locales/it/all";

 

However, if I take content of those files and put them without import (into app.component.ts) like

import { setData } from '@progress/kendo-angular-intl';
setData({ name: "en", ... }); // content replaced with '...' for clarity purposes
setData({ name: "it", ... });

 

then localization works as shown in example.

This is more like work-around but too much time was already spent on this issue so it will remain like this until proper solution is found.

0
Pera
Top achievements
Rank 1
answered on 31 May 2018, 01:34 PM

In previous post i have used an error message from sample which tried to load calendar, currencies and numbers separately from @progress\kendo-angular-intl\locales

ClientApp\node_modules\@progress\kendo-angular-intl\locales\en\<strong>calendar.js</strong>:1

 

However, same error will occur when en/all is tried (only different file name will be shown).

0
Svet
Telerik team
answered on 04 Jun 2018, 08:18 AM
Hi Pera,

I used the kendo-angular-quickstart-dotnet project referenced in the following article:

https://www.telerik.com/kendo-angular-ui/components/installation/dotnet-core/

and added the Locale Changes example demonstrated in the following article (check the fetch-data.component.ts):

https://www.telerik.com/kendo-angular-ui/components/internationalization/locale-changes/

The used version of the kendo-intl package is 1.4.0 (as demonstrated in the package-lock.json).

The app.module.ts imports successfully the locales as follows:
import '@progress/kendo-angular-intl/locales/en/all';
import '@progress/kendo-angular-intl/locales/bg/all';
import '@progress/kendo-angular-intl/locales/de/all';

The application seems to function as expected. Could you check it and provide some more details in case further assistance is required for this case. Thank you in advance.

Regards,
Svetlin
Progress Telerik
Try our brand new, jQuery-free Angular components built from ground-up which deliver the business app essential building blocks - a grid component, data visualization (charts) and form elements.
Tags
General Discussions
Asked by
Pera
Top achievements
Rank 1
Answers by
Svet
Telerik team
Pera
Top achievements
Rank 1
Share this question
or