New to Kendo UI for Angular? Start a free 30-day trial

Change the Default Decimal Symbol of a Locale

Environment

ProductProgress® Kendo UI for Angular

Description

How can I change the default decimal symbol of a locale?

Solution

By default, the decimal symbol is determined by the used locale. But there are cases when the symbol should not correspond to the locale (like changing the dots with commas and so on). To accomplish such customization:

  1. Use the localeData method of the service to retrieve the locale data for the specified locale.

    const enData: Locale = localeData('en');
  2. Using the numbers, symbols, and decimals properties of the locale, change the default decimal symbol:

    enData.numbers.symbols.decimal = ',';

The following examples show the full implementation of the suggested approach.

Example
View Source
Change Theme:

In this article

Not finding the help you need?