Open joe-ercolino opened 1 year ago
Thanks for the suggestion! Since the tool doesn't have a settings page right now, I've made it so that you can do this by manually setting localStorage. If you open your browser's dev tools and in the JS console type the following it'll change the locale to German using commas for decimal points:
localStorage["locale"] = "de-DE"
And if you change the locale to US it'll use periods for decimal points:
localStorage["locale"] = "en-US"
This value is fed into the browser's toLocaleString()
function to generate the number: https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Number/toLocaleString
After running the above commands you'll need to reload your tab for the change to take effect
It'll only affect the output in the right hand column, you can't change the accepted format for numbers which you type in the left hand column.
By the way, this is all relevant to the app running at https://notepadcalculator.com, which is actually different from the early prototype code in this repo.
Hope that helps!
I forgot to deploy the change before writing my message yesterday, sorry! The change is now live!
Hi
This is a great Web App. I use it daily instead of the system calculator.
In my case the results are displayed with commas instead of decimal points regardless of what I have used in the input. I suppose that this corresponds to my Chrome preferences. It is possible to match the decimal characters of the output with those in the input? Or at least it is posible to change the results decimal character to points without changing the system or browser's preferences?
Thanks in advanced.