Skip to content

Commit

Permalink
Select language automatically
Browse files Browse the repository at this point in the history
  • Loading branch information
Levminer committed Feb 12, 2024
1 parent 73fe8fc commit 88e76f4
Showing 1 changed file with 6 additions and 2 deletions.
8 changes: 6 additions & 2 deletions interface/utils/language/index.ts
Original file line number Diff line number Diff line change
@@ -1,10 +1,14 @@
import { localeEN } from "@utils/language/en"
import { localeHU } from "@utils/language/hu"
import { localeES } from "@utils/language/es"

export const getLanguage = () => {
const language = navigator.language

if (language.startsWith("en")) {
return localeEN
if (language.startsWith("es")) {
return localeES
} else if (language.startsWith("hu")) {
return localeHU
} else {
return localeEN
}
Expand Down

0 comments on commit 88e76f4

Please sign in to comment.