Getting Started with the Kendo UI for Angular Internationalization

This guide provides the information you need to start using the Kendo UI for Angular Internationalization componentit includes instructions about the available installation approaches, the required dependencies, the code for running the project, and links to additional resources.

The Internationalization Package is part of Kendo UI for Angular, a professional grade UI library with 100+ components for building modern and feature-rich applications. To try it out sign up for a free 30-day trial.

After the completion of this guide, you will be able to achieve an end result as demonstrated in the following example.

Example
View Source
Change Theme:

Setting Up Your Angular Project

Before you start with the installation of any Kendo UI for Angular control, ensure that you have a running Angular project. The prerequisites to accomplish the installation of the components are always the same regardless of the Kendo UI for Angular package you want to use, and are fully described in the section on setting up your Angular project.

Installing the Package

  1. To add the Kendo UI for Angular Internationalization package, run the following command:

    npm install --save @progress/kendo-angular-intl @progress/kendo-licensing
  2. Import the IntlModule in your root application or feature module.

    import { NgModule } from '@angular/core';
    import { BrowserModule } from '@angular/platform-browser';
    import { IntlModule } from '@progress/kendo-angular-intl';
    import { AppComponent } from './app.component';
    
    @NgModule({
        imports: [BrowserModule, IntlModule],
        declarations: [AppComponent],
        bootstrap: [AppComponent]
    })
    
    export class AppModule {}

Using the Package

  1. After successfully installing the Internationalization, provide the IntlService service in the constructor in the app.component.ts file:

    export class AppComponent {
    
    constructor(public intl: IntlService) {}
    }
    
  2. Then, use the formatNumber function of the service to format the number:

    <p>{{ intl.formatNumber(decimal, 'n2') }}</p>
  3. Build and serve the application by running the following command in the root folder.

    ng serve
  4. Point your browser to http://localhost:4200 to see the formatted number on the page.

Activating Your License Key

As of December 2020, using any of the UI components from the Kendo UI for Angular library requires either a commercial license key or an active trial license key. If your application does not contain a Kendo UI license file, activate your license key.

Next Steps

Dependencies

The following table lists the specific functionalities that are provided by each of the Internationalization dependencies as per package:

Package NameDescription
@angular/commonProvides the commonly-needed services, pipes, and directives provided by the Angular team. For more information, refer to the official Angular documentation.
@angular/coreContains critical runtime parts of the Angular framework that are needed by every application. For more information, refer to the official Angular documentation.
@progress/kendo-licensingContains the kendo-ui-license CLI Tool for license management and the validatePackage function and type definitions that are used by licensed packages.
rxjsProvides the RxJS library for reactive programming which uses Observables for an easier composition of asynchronous or callback-based code.

The following dependency will be installed automatically.

Package NameDescription
@progress/kendo-intlProvides the Kendo UI services and pipes for the parsing and formatting of dates and numbers by using Unicode Common Locale Data Repository (CLDR) data.

Learning Resources