mirror of
https://github.com/louislam/uptime-kuma.git
synced 2025-01-05 04:31:12 -05:00
Better locale default for status page.
This commit is contained in:
parent
7907c07034
commit
5b758a4e98
@ -49,7 +49,10 @@ const languageList = {
|
|||||||
|
|
||||||
const rtlLangs = ["fa"];
|
const rtlLangs = ["fa"];
|
||||||
|
|
||||||
export const currentLocale = () => localStorage.locale || "en";
|
export const currentLocale = () => localStorage.locale
|
||||||
|
|| languageList[navigator.language] && navigator.language
|
||||||
|
|| languageList[navigator.language.substring(0, 2)] && navigator.language.substring(0, 2)
|
||||||
|
|| "en";
|
||||||
|
|
||||||
export const localeDirection = () => {
|
export const localeDirection = () => {
|
||||||
return rtlLangs.includes(currentLocale()) ? "rtl" : "ltr";
|
return rtlLangs.includes(currentLocale()) ? "rtl" : "ltr";
|
||||||
|
Loading…
Reference in New Issue
Block a user