fix: Get language instead of hard coding
The language data that is used to set the locale of the session is now grabbed from the DOM intstead of relying on a hardcoded value.
This commit is contained in:
parent
ca43dafd6a
commit
1076cd2895
|
|
@ -37,8 +37,11 @@
|
|||
// GNU won't support my choice of browser so I won't support their tool
|
||||
|
||||
function formatNumbers() {
|
||||
|
||||
const numbers = document.getElementsByTagName("num");
|
||||
const formatter = Intl.NumberFormat(navigator.language);
|
||||
const documentLanguage = document.documentElement.lang;
|
||||
const formatter = Intl.NumberFormat(documentLanguage);
|
||||
|
||||
for (let num of numbers) {
|
||||
var number = parseFloat(num.innerHTML);
|
||||
if (isNaN(number)) {
|
||||
|
|
|
|||
Loading…
Reference in New Issue
Block a user