-
Data Grid
- Overview
-
Data Binding
-
Paging and Scrolling
-
Editing
-
Grouping
-
Filtering and Sorting
- Focused Row
-
Row Drag & Drop
-
Selection
-
Columns
- State Persistence
-
Appearance
-
Templates
-
Data Summaries
-
Master-Detail
-
Export to PDF
-
Export to Excel
-
Adaptability
- Keyboard Navigation
-
Pivot Grid
- Overview
-
Data Binding
-
Field Chooser
-
Features
-
Export to Excel
-
Tree List
- Overview
-
Data Binding
- Sorting
- Paging
-
Editing
- Node Drag & Drop
- Focused Row
-
Selection
-
Filtering
-
Column Customization
- State Persistence
- Adaptability
- Keyboard Navigation
-
Scheduler
- Overview
-
Data Binding
-
Views
-
Features
- Virtual Scrolling
-
Grouping
-
Customization
- Adaptability
-
Html Editor
-
Chat
-
Diagram
- Overview
-
Data Binding
-
Featured Shapes
-
Custom Shapes
-
Document Capabilities
-
User Interaction
- UI Customization
- Adaptability
-
Charts
- Overview
-
Data Binding
-
Area Charts
-
Bar Charts
- Bullet Charts
-
Doughnut Charts
-
Financial Charts
-
Line Charts
-
Pie Charts
-
Point Charts
-
Polar and Radar Charts
-
Range Charts
-
Sparkline Charts
-
Tree Map
-
Funnel and Pyramid Charts
- Sankey Chart
-
Combinations
-
More Features
-
Export
-
Selection
-
Tooltips
-
Zooming
-
-
Gantt
- Overview
-
Data
-
UI Customization
- Strip Lines
- Export to PDF
- Sorting
-
Filtering
-
Reporting
- AI-powered Extensions
-
Interaction
-
Report Types
-
Data binding
-
Real-life Reports
-
Layout Features
-
Report Controls
-
Web-specific Features
-
Rich Text Editor
- Overview
- Load/Save
- Document Protection
-
Templates
- Autocorrect
-
Customization
- Simple View
-
Spreadsheet
- Overview
-
Open a Document
- Export And Printing
-
Features
-
UI Customization
-
Gauges
- Overview
-
Data Binding
-
Bar Gauge
-
Circular Gauge
-
Linear Gauge
-
Navigation
- Overview
- Accordion
-
Menu
- Multi View
-
Drawer
-
Tab Panel
-
Tabs
-
Toolbar
- Pagination
-
Tree View
- Right-to-Left Support
-
Layout
-
Tile View
- Splitter
-
Gallery
- Scroll View
- Resizable
-
-
Editors
- Overview
- Autocomplete
-
Calendar
- Check Box
- Color Box
- Date Box
-
Date Range Box
-
Drop Down Box
-
Number Box
-
Select Box
- Switch
-
Tag Box
- Text Area
- Text Box
- Validation
- Custom Text Editor Buttons
- Right-to-Left Support
- Editor Appearance Variants
-
Forms and Multi-Purpose
- Overview
- Button Group
- Field Set
-
Filter Builder
-
Form
- Radio Group
-
Range Selector
- Numeric Scale (Lightweight)
- Numeric Scale
- Date-Time Scale (Lightweight)
- Date-Time Scale
- Logarithmic Scale
- Discrete scale
- Custom Formatting
- Use Range Selection for Calculation
- Use Range Selection for Filtering
- Image on Background
- Chart on Background
- Customized Chart on Background
- Chart on Background with Series Template
- Range Slider
- Slider
-
Sortable
-
File Management
-
File Manager
- Overview
-
File System Types
-
Customization
-
File Uploader
-
-
Actions and Lists
-
Maps
- Overview
-
Map
-
Vector Map
-
Dialogs and Notifications
-
Localization
Related Demos:
Your search did not match any results.
Localization - Using Intl
DevExtreme ASP.NET Core components can be localized using the Intl object. Refer to this article for detailed instructions.
Was this demo helpful?
Feel free to share demo-related thoughts here.
If you have technical questions, please create a support ticket in the DevExpress Support Center.
Thank you for the feedback!
If you have technical questions, please create a support ticket in the DevExpress Support Center.
Backend API
@section Localization {
<script src="https://cdn3.devexpress.com/jslib/24.2.3/js/localization/dx.messages.de.js"></script>
<script src="https://cdn3.devexpress.com/jslib/24.2.3/js/localization/dx.messages.ru.js"></script>
}
@model IEnumerable<DevExtreme.NETCore.Demos.Models.Payment>
<div id="data-grid-demo">
@(Html.DevExtreme().DataGrid()
.DataSource(Model)
.Columns(columns => {
columns.Add().DataField("PaymentId")
.Caption(new JS("formatMessage('Number')"))
.Width(100)
.AllowEditing(false);
columns.Add().DataField("ContactName")
.Caption(new JS("formatMessage('Contact')"));
columns.Add().DataField("CompanyName")
.Caption(new JS("formatMessage('Company')"));
columns.Add().DataField("Amount")
.Caption(new JS("formatMessage('Amount')"))
.DataType(GridColumnDataType.Number)
.Format(Format.Currency)
.EditorOptions(new JS("amountEditorOptions"));
columns.Add().DataField("PaymentDate")
.Caption(new JS("formatMessage('PaymentDate')"))
.DataType(GridColumnDataType.Date);
})
.FilterRow(filterRow => filterRow
.Visible(true)
.ApplyFilter(GridApplyFilterMode.Auto)
)
.Editing(c => c
.Mode(GridEditMode.Popup)
.AllowUpdating(true)
.Popup(e => e
.Width(700)
.Height(345)
)
)
)
<div class="options">
<div class="caption">Options</div>
<div class="option">
<label for="selectInput">Language</label>
@(Html.DevExtreme().SelectBox()
.ID("selectBox")
.InputAttr("id", "selectInput")
.DataSource(new JS("locales"))
.DisplayExpr("name")
.ValueExpr("value")
.Value(new JS("locale"))
.OnValueChanged("changeLocale")
)
</div>
</div>
</div>
<script>
var amountEditorOptions = {
format: 'currency',
showClearButton: true,
inputAttr: {
'aria-label': 'Filter сell',
},
};
var dictionary = {
"en": {
"Number": "Number",
"Contact": "Contact",
"Company": "Company",
"Amount": "Amount",
"PaymentDate": "Payment Date"
},
"de": {
"Number": "Nummer",
"Contact": "Ansprechpartner",
"Company": "Firma",
"Amount": "Betrag",
"PaymentDate": "Zahlungsdatum"
},
"ru": {
"Number": "Номер",
"Contact": "Имя",
"Company": "Организация",
"Amount": "Сумма",
"PaymentDate": "Дата оплаты"
}
};
DevExpress.localization.loadMessages(dictionary);
var formatMessage = DevExpress.localization.formatMessage;
var locales = [
{ name: "English", value: "en" },
{ name: "Deutsch", value: "de" },
{ name: "Русский", value: "ru" }
];
var locale = getLocale();
DevExpress.localization.locale(locale);
function changeLocale(data) {
setLocale(data.value);
document.location.reload();
}
function getLocale() {
var locale = sessionStorage.getItem("locale");
return locale != null ? locale : "en";
}
function setLocale(locale) {
sessionStorage.setItem("locale", locale);
}
</script>
using DevExtreme.AspNet.Mvc;
using DevExtreme.NETCore.Demos.Models.SampleData;
using Microsoft.AspNetCore.Mvc;
using System.Linq;
namespace DevExtreme.NETCore.Demos.Controllers {
public class LocalizationController : Controller {
public ActionResult UsingIntl() {
return View(SampleData.Payments);
}
}
}
using System;
using System.Collections.Generic;
using System.Linq;
namespace DevExtreme.NETCore.Demos.Models {
public class Payment {
public int PaymentId { get; set; }
public string ContactName { get; set; }
public string CompanyName { get; set; }
public int Amount { get; set; }
public DateTime PaymentDate { get; set; }
}
}
using System;
using System.Collections.Generic;
namespace DevExtreme.NETCore.Demos.Models.SampleData {
public partial class SampleData {
public static readonly IEnumerable<Payment> Payments = new[] {
new Payment {
PaymentId = 1,
ContactName = "Nancy Davolio",
CompanyName = "Premier Buy",
Amount = 1740,
PaymentDate = DateTime.Parse("2013/01/06")
},
new Payment {
PaymentId = 2,
ContactName = "Andrew Fuller",
CompanyName = "ElectrixMax",
Amount = 850,
PaymentDate = DateTime.Parse("2013/01/13")
},
new Payment {
PaymentId = 3,
ContactName = "Janet Leverling",
CompanyName = "Video Emporium",
Amount = 2235,
PaymentDate = DateTime.Parse("2013/01/07")
},
new Payment {
PaymentId = 4,
ContactName = "Margaret Peacock",
CompanyName = "Screen Shop",
Amount = 1965,
PaymentDate = DateTime.Parse("2013/01/03")
},
new Payment {
PaymentId = 5,
ContactName = "Steven Buchanan",
CompanyName = "Braeburn",
Amount = 880,
PaymentDate = DateTime.Parse("2013/01/10")
},
new Payment {
PaymentId = 6,
ContactName = "Michael Suyama",
CompanyName = "PriceCo",
Amount = 5260,
PaymentDate = DateTime.Parse("2013/01/17")
},
new Payment {
PaymentId = 7,
ContactName = "Robert King",
CompanyName = "Ultimate Gadget",
Amount = 2790,
PaymentDate = DateTime.Parse("2013/01/21")
},
new Payment {
PaymentId = 8,
ContactName = "Laura Callahan",
CompanyName = "EZ Stop",
Amount = 3140,
PaymentDate = DateTime.Parse("2013/01/01")
},
new Payment {
PaymentId = 9,
ContactName = "Anne Dodsworth",
CompanyName = "Clicker",
Amount = 6175,
PaymentDate = DateTime.Parse("2013/01/24")
},
new Payment {
PaymentId = 10,
ContactName = "Clark Morgan",
CompanyName = "Store of America",
Amount = 4575,
PaymentDate = DateTime.Parse("2013/01/11")
}
};
}
}
.options {
padding: 20px;
background-color: rgba(191, 191, 191, 0.15);
margin-top: 20px;
}
.option {
margin-top: 10px;
}
.caption {
font-size: 18px;
font-weight: 500;
}
.option > label {
margin-right: 10px;
}
.option > .dx-selectbox {
display: inline-block;
vertical-align: middle;
}