From b547720aa83e78fcdaa681be5b7255660e15c213 Mon Sep 17 00:00:00 2001 From: Steven Date: Sun, 3 Nov 2024 22:48:39 +0800 Subject: [PATCH] chore: add id to i18n locales --- web/src/i18n.ts | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/web/src/i18n.ts b/web/src/i18n.ts index 4fe51acd..d00bc74a 100644 --- a/web/src/i18n.ts +++ b/web/src/i18n.ts @@ -1,8 +1,9 @@ import i18n, { BackendModule, FallbackLng, FallbackLngObjList } from "i18next"; +import { orderBy } from "lodash-es"; import { initReactI18next } from "react-i18next"; import { findNearestMatchedLanguage } from "./utils/i18n"; -export const locales = [ +export const locales = orderBy([ "ar", "de", "en", @@ -12,6 +13,7 @@ export const locales = [ "hi", "hr", "hu", + "id", "it", "ja", "ka-GE", @@ -30,7 +32,7 @@ export const locales = [ "vi", "zh-Hans", "zh-Hant", -] as const; +]); const fallbacks = { "zh-HK": ["zh-Hant", "en"],