Globalization

The globalization process combines the translation of component messages with adapting them to specific cultures.

For more information on how globalization practices are implemented in Kendo UI for Angular, refer to the overview article. For more information on the globalization aspects which are available for each component, refer to the article on globalization support.

Internationalization

The internationalization (i18n) process applies specific culture formats to a web application.

For more information, refer to:

Messages

The Dialog and Window components support both built-in and custom messages.

Built-In Messages

To translate the built-in messages, utilize the Angular i18n framework. For more information on how to achieve this, refer to the article on Localization.

Custom Messages

You can also override individual messages for each component instance by utilizing the attribute bindings. To use them, you do not have to set up the application for i18n.

In i18n applications, message attributes take precedence over localized text from translation files.

The following example demonstrates how to customize the built-in messages of the Dialog.

@Component({
    selector: 'my-app',
    template: `
        <p>Dialog</p>
        <p>Hover over the <strong>Close</strong> button to see custom messages:</p>

        <kendo-dialog title="Please confirm" (close)="close('cancel')" [minWidth]="250" [width]="450">
            <kendo-dialog-messages
                [closeTitle]="'Custom Close title'"
            >
            </kendo-dialog-messages>

            <p style="margin: 30px; text-align: center;">Are you sure you want to continue?</p>
            <kendo-dialog-actions>
                <button kendoButton (click)="close('no')">No</button>
                <button kendoButton (click)="close('yes')" primary="true">Yes</button>
            </kendo-dialog-actions>
        </kendo-dialog>
  `
})
class AppComponent {
    public close(status) {
      console.log(`Dialog result: ${status}`);
    }
}

The following example demonstrates how to customize the built-in messages of the Window.

@Component({
    selector: 'my-app',
    template: `
        <p>Window</p>
        <p>Hover over the <strong>Close/Minimize/Maximize/Restore</strong> buttons to see custom messages:</p>

        <kendo-window [title]="'Window title'">
            <kendo-window-messages
                [closeTitle]="'Custom Close title'"
                [minimizeTitle]="'Custom Minimize title'"
                [maximizeTitle]="'Custom Maximize title'"
                [restoreTitle]="'Custom Restore title'"
            >
            </kendo-window-messages>
            <p style="text-align: center;">Custom button messages applied</p>
      </kendo-window>
  `
})
class AppComponent {
    public close(status) {
      console.log(`Dialog result: ${status}`);
    }
}

Right-to-Left Support

The following example demonstrates how to utilize the RTL support for the Dialogs.

import { Component } from '@angular/core';

@Component({
    selector: 'my-app',
    template: `
      <div class="example-wrapper">
        <button kendoButton *ngIf="!opened" (click)="open()">Open dialog</button>
        <kendo-dialog title="Please confirm" *ngIf="opened" (close)="close('cancel')" [minWidth]="250" [width]="450">
            <p style="margin: 30px; text-align: center;">Are you sure you want to continue?</p>
            <kendo-dialog-actions>
                <button kendoButton (click)="close('no')">No</button>
                <button kendoButton (click)="close('yes')" primary="true">Yes</button>
            </kendo-dialog-actions>
        </kendo-dialog>
      </div>
    `
})
export class AppComponent {
    public opened = true;

    public close(status) {
      console.log(`Dialog result: ${status}`);
      this.opened = false;
    }

    public open() {
      this.opened = true;
    }
}
import { NgModule } from '@angular/core';
import { BrowserModule } from '@angular/platform-browser';
import { BrowserAnimationsModule } from '@angular/platform-browser/animations';
import { RTL } from '@progress/kendo-angular-l10n';
import { ButtonsModule } from '@progress/kendo-angular-buttons';
import { DialogModule } from '@progress/kendo-angular-dialog';

import { AppComponent } from './app.component';

@NgModule({
  bootstrap:    [AppComponent],
  declarations: [AppComponent],
  imports:      [BrowserModule, BrowserAnimationsModule, ButtonsModule, DialogModule],
  providers:    [{ provide: RTL, useValue: true }]
})
export class AppModule { }
import { enableProdMode } from '@angular/core';
import { platformBrowserDynamic } from '@angular/platform-browser-dynamic';
import { AppModule } from './app.module';

enableProdMode();

const platform = platformBrowserDynamic();
platform.bootstrapModule(AppModule);

In this article