-
Notifications
You must be signed in to change notification settings - Fork 1
/
Copy pathapp.component.ts
30 lines (27 loc) · 1.24 KB
/
app.component.ts
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
import { Component } from '@angular/core';
import { CommonModule } from '@angular/common';
import { RouterOutlet } from '@angular/router';
import { DxDashboardControlModule } from 'devexpress-dashboard-angular';
import { DxButtonModule } from 'devextreme-angular';
import { ResourceManager } from 'devexpress-dashboard';
import { locale } from "devextreme/localization";
import dashboardDE from '../../json resources/dx-dashboard.de.json';
import analyticsDE from '../../json resources/dx-analytics-core.de.json';
@Component({
selector: 'app-root',
standalone: true,
imports: [CommonModule, RouterOutlet, DxDashboardControlModule, DxButtonModule],
templateUrl: './app.component.html',
styleUrl: './app.component.css'
})
export class AppComponent {
constructor() {
// Localize the Web Dashboard UI for the German market (the 'de' culture):
ResourceManager.setLocalizationMessages(dashboardDE);
ResourceManager.setLocalizationMessages(analyticsDE);
// Apply culture-specific formatting:
locale('de');
// Localize the specified string at runtime (the "Export To" button's caption in the dashboard title):
ResourceManager.setLocalizationMessages({ "DashboardStringId.ActionExportTo": "Custom Text for Export Button" });
}
}