Globalization Support in MaskEdit

16 Aug 20181 minute to read

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/aspnetmvc/globalization

The following example describes the way to use localization in MaskEdit.

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/24.2.3/js/i18n/ej.culture.de-DE.min.js"></script>
  • CSHTML
  • <label for="mask">Mask Edit</label>
    
    @(Html.EJ().MaskEdit("maskedit").InputMode(InputMode.Text).MaskFormat("$999,999.99").Width("100%").Locale("de-DE"))

    Output of MaskEdit with localization.

    MaskEdit with de-DE locale

    MaskEdit with default (en-US) locale