Firefox doesn’t have any locale settings. It has two language settings:
- UI (“menus, messages, and notifications from Firefox”) and
- Web content (“language for displaying pages”)
Why does Firefox need to know your locale? Well, apparently HTML now incorporates things like date pickers using things like <input type="date">
. This means that the browser has to implement a date picker. This is probably a good thing – at least it’s one less icky javascript app. But Firefox does not care about your locale settings (LC_*) by default. It just tries to figure stuff out on it’s own. That’s a bad thing.
You see, Firefox gets confused on multiple fronts here. First of all, language is not locale. People can prefer an English language UI or web page but want numbers, dates etc. displayed in their national or regional conventions. Or be American and recognise the superiority of the 24 hour clock or sensible date formatting. Secondly, it seems to draw the line between UI and content in a somewhat unintuitive manner.
At any rate here’s what Firefox does by default: When using a date picker Firefox will follow the locale conventions usually associated with the UI language. If it’s US English you get mm/dd/yyyy, a 12 hour clock and weeks that begin on Sundays. Changing web content preferences has no influence. Seemingly only using a UI language associated with 24 hour clocks etc. will make it switch.
In order to switch to a more sensible approach we can toggle the value of
intl.regional_prefs.use_os_locales
in about:config
to true
. This will mean that the LC_*
locale settings of your operationg system (in this case LC_TIME
) will be used instead of inferring a locale from the UI language. In my case:
[ ~ ] localectl | grep TIME
LC_TIME=da_DK.UTF-8
You can read more about setting locale settings over on the Arch wiki.