Linear gauge provide supports for internationalization for below gauge elements.
For more information about number and date formatter you can refer
internationalization
.
Globalization
Globalization is the process of designing and developing an component that works in different cultures/locales. Internationalization library is used to globalize number in LinearGauge component
using format
property in labelStyle
.
Numeric Format
In the below example axis labels are globalized
to EUR.
import { LinearGauge } from '@syncfusion/ej2-lineargauge';
import { loadCldr, setCulture, Ajax, setCurrencyCode } from '@syncfusion/ej2-base';
setCulture("de");
setCurrencyCode('EUR');
let gauge: LinearGauge = new LinearGauge({
locale: "de",
format:'c',
axes: [{
labelStyle: {
format: 'c',
font: {
color: 'red'
}
}
}]
}, '#element');
<!DOCTYPE html>
<html lang="en">
<head>
<title>EJ2 Animation</title>
<meta charset="utf-8" />
<meta name="viewport" content="width=device-width, initial-scale=1.0" />
<meta name="description" content="Typescript UI Controls" />
<meta name="author" content="Syncfusion" />
<link href="index.css" rel="stylesheet" />
<link href="//cdn.syncfusion.com/ej2/ej2-popups/styles/material.css" rel="stylesheet" />
<script src="https://cdnjs.cloudflare.com/ajax/libs/systemjs/0.19.38/system.js"></script>
<script src="systemjs.config.js"></script>
</head>
<body>
<div id='loader'>Loading....</div>
<div id='container'>
<div id='element'></div>
</div>
</body>
</html>