Before you read this question. I assume that the main answers will be "No you cant. For X reasons"
I'm just asking the question after long investigation and found nothing about it. So who knows. I might get some answers here for what I'm looking to
Question: I want to get the OS language or date / time formatting from the javascript / typescript. I don't want to use the browsers locale. How can I do that, if it's possible?
Environment:
- Angular SPA app
- Support for different date / time format depending of user locale
Current status: Web app in which we format the dates depending of users locale (getting it from browsers culture)
Wanted status:
Same but we get the locale / date & time format from the OS of the user
Why ?
Because we develop an app, which our customers might be users that CAN'T change their settings of the browser, but they could of their OS.
So for consistency, we would like to use the OS settings