jsFrontend.locale fixes #2850
Pull request description
Previously, we assumed that, as soon as
This PR changes the code so we keep 'getting' the requested locale until the locale is actually initialized.
I've also added some other fixes that caused issues in browsers like Safari when the locale was not initialized. So they're no longer actually necessary but I've included them anyway as a sort of defensive programming addition.