Globalization, Localization, Internationalization and Multi languages (edit)
ASP.NET Globalization and Localization
https://docs.microsoft.com/en-us/previous-versions/c6zyy3s9(v=vs.140)
<system.web>
<globalization uiCulture=“auto“ culture=“auto“ />
</system.web>
https://www.codeproject.com/Articles/80083/Detecting-User-Regional-Settings-In-The-Web-Browse
var x = 111111111.111111111;
var numFormatted = x.toLocaleString(navigator.language);
var numFormatted2 = x.toLocaleString('hihihi');
var numFormatted3 = x.toLocaleString();
var dt = new Date(9999, 11, 31, 23, 30, 45);
var dtFormatted = dt.toLocaleString(navigator.language);
var dtFormatted2 = dt.toLocaleString('hihihi');
var dtFormatted3 = dt.toLocaleString();
If the toLocaleString() and localeFormat() functions don't work, you might try considering a plug-in like globalize.js, which is designed to handle implementing globalization features like you are referring to.
I would highly recommend using a library for something like this, as it will likely be more well-tested and reliable than an attempt and manually splitting your values for every culture that you need to target.