All Components

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.

The following example demonstrates how to set the locale and text direction of an Arc, Linear, and Radial Gauge.

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

@Component({
    selector: 'my-app',
    template: `
        <div class="row">
          <div class="col-sm-12 col-md-2">
            <kendo-lineargauge [pointer]="{ value: value }" [scale]="{ labels: { format: 'c' } }">
            </kendo-lineargauge>
          </div>
          <div class="col-sm-12 col-md-5">
            <kendo-radialgauge [pointer]="{ value: value }" [scale]="{ labels: { format: 'c' } }">
            </kendo-radialgauge>
          </div>
          <div class="col-sm-12 col-md-5">
            <kendo-arcgauge [value]="value">
              <kendo-arcgauge-scale [majorTicks]="{ visible: true }" [minorTicks]="{ visible: true }">
                <kendo-arcgauge-scale-labels format="c">
                </kendo-arcgauge-scale-labels>
              </kendo-arcgauge-scale>
              <ng-template kendoArcGaugeCenterTemplate let-value="value">
                  {{ value | kendoNumber: 'c' }}
              </ng-template>
            </kendo-arcgauge>
          </div>
        </div>
    `,
    styles: [`
        .k-gauge {
            display: block;
        }
    `]
})
export class AppComponent {
    public value = 30;
}
import { NgModule, LOCALE_ID } from '@angular/core';
import { BrowserModule } from '@angular/platform-browser';
import { GaugesModule } from '@progress/kendo-angular-gauges';
import { IntlModule } from '@progress/kendo-angular-intl';

// Load all required data for the bg locale
import '@progress/kendo-angular-intl/locales/bg/all';

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

@NgModule({
  bootstrap:    [ AppComponent ],
  declarations: [ AppComponent ],
  imports:      [
    BrowserModule,
    GaugesModule,

    // Import the internationalization module
    IntlModule
  ],
  providers:    [{
    // Set default locale to bg
    provide: LOCALE_ID, useValue: 'bg'
  }]
})

export class AppModule { }
import { enableProdMode } from '@angular/core';
import { platformBrowserDynamic } from '@angular/platform-browser-dynamic';

import { GaugesModule } from '@progress/kendo-angular-gauges';
import { AppModule } from './app.module';

enableProdMode();

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

Internationalization

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

For more information, refer to:

Messages

The Gauges do not provide built-in translated messages or the option to implement and localize custom ones.

Right-to-Left Support

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

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

import { saveAs } from '@progress/kendo-file-saver';

@Component({
    selector: 'my-app',
    template: `
        <kendo-lineargauge [pointer]="{ value: value }" [scale]="{ vertical: false, labels: { format: 'c' } }">
        </kendo-lineargauge>
    `,
    styles: [`
        .k-gauge {
            display: block;
            width: 300px;
            margin: 0 auto;
        }
    `]
})
export class AppComponent {
  public value = 30;
}
import { NgModule, LOCALE_ID } from '@angular/core';
import { BrowserModule } from '@angular/platform-browser';
import { GaugesModule } from '@progress/kendo-angular-gauges';
import { IntlModule } from '@progress/kendo-angular-intl';
import { RTL } from '@progress/kendo-angular-l10n';

// Load all required data for the he locale
import '@progress/kendo-angular-intl/locales/he/all';

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

@NgModule({
  bootstrap:    [ AppComponent ],
  declarations: [ AppComponent ],
  imports:      [
    BrowserModule,
    GaugesModule,

    // Import the internationalization module
    IntlModule
  ],
  providers:    [{
    // Set default locale to he-IL
    provide: LOCALE_ID, useValue: 'he-IL'
  }, {
    // Set the text direction to Right-to-Left
    provide: RTL, useValue: true
  }]
})

export class AppModule { }
import { enableProdMode } from '@angular/core';
import { platformBrowserDynamic } from '@angular/platform-browser-dynamic';

import { GaugesModule } from '@progress/kendo-angular-gauges';
import { AppModule } from './app.module';

enableProdMode();

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

In this article