Update language files and fix UI issues

This commit is contained in:
n4ze3m
2024-03-24 17:07:21 +05:30
parent d9ce1e2d2c
commit 502759fae6
24 changed files with 485 additions and 54 deletions

View File

@@ -2,6 +2,7 @@ import i18n from "i18next";
import LanguageDetector from "i18next-browser-languagedetector";
import { initReactI18next } from "react-i18next";
import { en } from "./lang/en";
import { ml } from "./lang/ml";
i18n
.use(LanguageDetector)
@@ -9,7 +10,8 @@ i18n
.init({
debug: true,
resources: {
en: en
en: en,
ml: ml
},
fallbackLng: "en",
lng: localStorage.getItem("i18nextLng") || "en",

View File

@@ -1,10 +1,10 @@
import option from "@/assets/locale/en/option.json";
import optionPlayground from "@/assets/locale/en/option-playground.json";
import playground from "@/assets/locale/en/playground.json";
import common from "@/assets/locale/en/common.json";
export const en = {
option,
optionPlayground,
playground,
common
}

10
src/i18n/lang/ml.ts Normal file
View File

@@ -0,0 +1,10 @@
import option from "@/assets/locale/ml/option.json";
import playground from "@/assets/locale/ml/playground.json";
import common from "@/assets/locale/ml/common.json";
export const ml = {
option,
playground,
common
}

View File

@@ -0,0 +1,11 @@
// Please add new language code to supportLanguage array
export const supportLanguage = [
{
label: "English",
value: "en"
},
{
label: "മലയാളം",
value: "ml"
}
]