-
Notifications
You must be signed in to change notification settings - Fork 0
/
number.html
88 lines (84 loc) · 3.51 KB
/
number.html
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
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
<!DOCTYPE html>
<html>
<head>
<meta charset="utf-8">
<title>intl-number demo</title>
<style>
html { font-family: -apple-system,BlinkMacSystemFont,Segoe UI,Helvetica,Arial,sans-serif,Apple Color Emoji,Segoe UI Emoji; }
p > span, p > intl-number { display: block }
intl-number { font-weight: bold; }
</style>
</head>
<body>
<h1>intl-number demo</h1>
<p>
<span><intl-number value="123456.789"></span>
<intl-number value="123456.789"></intl-number>
</p>
<p>
<span><intl-number value="123456.789" lng="en-IN"></span>
<intl-number value="123456.789" lng="en-IN"></intl-number>
</p>
<p>
<span><intl-number value="123456.789" lng="ar-EG"></span>
<intl-number value="123456.789" lng="ar-EG"></intl-number>
</p>
<p>
<span><intl-number value="123456.789" lng="zh-Hans-CN-u-nu-hanidec"></span>
<intl-number value="123456.789" lng="zh-Hans-CN-u-nu-hanidec"></intl-number>
</p>
<p>
<span><intl-number value="123456.789" lng="de-DE" options='{"style":"currency","currency":"EUR"}'></span>
<intl-number value="123456.789" lng="de-DE" options='{"style":"currency","currency":"EUR"}'></intl-number>
</p>
<p>
<span><intl-number value="123456.789" lng="ja-JP" styleProp="currency" currency="JPY"></span>
<intl-number value="123456.789" lng="ja-JP" styleProp="currency" currency="JPY"></intl-number>
</p>
<p>
<span><intl-number value="123456.789" lng="en-IN" maximumSignificantDigits="3"></span>
<intl-number value="123456.789" lng="en-IN" maximumSignificantDigits="3"></intl-number>
</p>
<hr>
<p><code>styleProp="unit"</code> not supported in Firefox (v74) and Safari (v13)</p>
<p>
<span><intl-number value="50" lng="pt-PT" styleProp="unit" unit="mile-per-hour"></span>
<intl-number value="50" lng="pt-PT" styleProp="unit" unit="mile-per-hour"></intl-number>
</p>
<p>
<span><intl-number value="12" lng="en-GB" styleProp="unit" unit="liter" unitDisplay="long"></span>
<intl-number value="12" lng="en-GB" styleProp="unit" unit="liter" unitDisplay="long"></intl-number>
</p>
<hr>
<p><code>notation</code> not supported in Firefox (v74) and Safari (v13)</p>
<p>
<span><intl-number value="987654321" lng="en-US" notation="scientific"></span>
<intl-number value="987654321" lng="en-US" notation="scientific"></intl-number>
</p>
<p>
<span><intl-number value="987654321" lng="pt-PT" notation="scientific"></span>
<intl-number value="987654321" lng="pt-PT" notation="scientific"></intl-number>
</p>
<p>
<span><intl-number value="987654321" lng="en-GB" notation="engineering"></span>
<intl-number value="987654321" lng="en-GB" notation="engineering"></intl-number>
</p>
<p>
<span><intl-number value="987654321" lng="de" notation="engineering"></span>
<intl-number value="987654321" lng="de" notation="engineering"></intl-number>
</p>
<p>
<span><intl-number value="987654321" lng="zh-CN" notation="compact"></span>
<intl-number value="987654321" lng="zh-CN" notation="compact"></intl-number>
</p>
<p>
<span><intl-number value="987654321" lng="fr" notation="compact"></span>
<intl-number value="987654321" lng="fr" notation="compact"></intl-number>
</p>
<!-- intl-number works also without i18next -->
<!-- <script src="https://unpkg.com/i18next@19/i18next.min.js"></script> -->
<script src="https://unpkg.com/i18next-wc/dist/intl-number.js"></script>
<!-- <script src="../dist/intl-number.js"></script> -->
<script src="iframeheight.js"></script>
</body>
</html>