Globalization Support in MaskEdit

We have provided the globalization support in MaskEdit control. Our MaskEdit control mainly rendered based on the maskFormat property, so we have provided the globalization support based on the maskFormat literals. We have given this globalization support option on below maskFormat literals in MaskEdit control. You can change the globalization by using the locale property. The default value for locale property is ‘en-US’ in MaskEdit control.

Formats Description
$ Currency symbol value will be changed based on the corresponding culture.
. Decimal Separator value will be changed based on the corresponding culture.
, Thousand Separator will be changed based on the corresponding culture.

To know more about EJ globalize support, please refer the below link

https://help.syncfusion.com/js/localization

The following example describes the way to use localization for MaskEdit widgets.

Refer the below German culture file in head section of HTML page after the reference of ej.web.all.min.js file.

  • javascript
  • <script src="http://cdn.syncfusion.com/17.1.0.47/js/i18n/ej.culture.de-DE.min.js"></script>
  • html
  • <input id="maskEdit" ej-maskedit [value]="value" [maskFormat]="format" [locale]="locale" [inputMode]="inputMode" />
  • html
  • import { Component } from '@angular/core';
    
    @Component({
      selector: 'ej-app',
      templateUrl: 'src/maskEdit/maskEdit.component.html'
    })
    export class MaskEditComponent {
        public value: string;
        public format: any;
        public inputMode: any;
        public locale: string;
        constructor() {
            this.value = 1234567;
            this.format = "$99,999.99";
            this.inputMode = ej.InputMode.Text;
            this.locale = "de-DE";
        }
    }

    The output for MaskEdit with Globalization.

    MaskEdit with de-DE locale

    MaskEdit with en-US locale