Format dates, times with window.navigator.language instead of UI i18n locale #354

Merged
floatingghost merged 2 commits from smitten/akkoma-fe:date-locale-fix-cherrypick into develop 2023-12-15 11:53:00 +00:00
Showing only changes of commit c9dc8f00f9 - Show all commits

View file

@ -8,7 +8,7 @@ const specialLanguageCodes = {
'zh': 'zh-Hans'
}
const internalToBrowserLocale = code => specialLanguageCodes[code] || code
const internalToBrowserLocale = fallbackCode => specialLanguageCodes[fallbackCode] || window.navigator.language || fallbackCode
const internalToBackendLocale = code => internalToBrowserLocale(code).replace('_', '-')