diff --git a/numberFormat.js b/numberFormat.js index 99230ab..dbde2c1 100644 --- a/numberFormat.js +++ b/numberFormat.js @@ -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)) {