Add germanm support
This commit is contained in:
@@ -4,12 +4,13 @@ import LanguageDetector from "i18next-browser-languagedetector";
|
|||||||
|
|
||||||
import enTranslation from "../locales/en/translation.json";
|
import enTranslation from "../locales/en/translation.json";
|
||||||
import zhTranslation from "../locales/zh/translation.json";
|
import zhTranslation from "../locales/zh/translation.json";
|
||||||
|
import deTranslation from "../locales/de/translation.json";
|
||||||
|
|
||||||
i18n
|
i18n
|
||||||
.use(LanguageDetector)
|
.use(LanguageDetector)
|
||||||
.use(initReactI18next)
|
.use(initReactI18next)
|
||||||
.init({
|
.init({
|
||||||
supportedLngs: ["en", "zh"],
|
supportedLngs: ["en", "zh", "de"],
|
||||||
fallbackLng: "en",
|
fallbackLng: "en",
|
||||||
debug: false,
|
debug: false,
|
||||||
|
|
||||||
@@ -28,6 +29,9 @@ i18n
|
|||||||
zh: {
|
zh: {
|
||||||
translation: zhTranslation,
|
translation: zhTranslation,
|
||||||
},
|
},
|
||||||
|
de: {
|
||||||
|
translation: deTranslation,
|
||||||
|
},
|
||||||
},
|
},
|
||||||
|
|
||||||
interpolation: {
|
interpolation: {
|
||||||
|
|||||||
@@ -1,5 +1,5 @@
|
|||||||
import React from "react";
|
import React from "react";
|
||||||
import { cn } from "@/lib/utils";
|
import { cn } from "@/lib/utils.ts";
|
||||||
import { useTranslation } from "react-i18next";
|
import { useTranslation } from "react-i18next";
|
||||||
import {
|
import {
|
||||||
Download,
|
Download,
|
||||||
@@ -12,6 +12,7 @@ import { Globe } from "lucide-react";
|
|||||||
const languages = [
|
const languages = [
|
||||||
{ code: "en", name: "English", nativeName: "English" },
|
{ code: "en", name: "English", nativeName: "English" },
|
||||||
{ code: "zh", name: "Chinese", nativeName: "中文" },
|
{ code: "zh", name: "Chinese", nativeName: "中文" },
|
||||||
|
{ code: "de", name: "German", nativeName: "Deutsch" },
|
||||||
];
|
];
|
||||||
|
|
||||||
export function LanguageSwitcher() {
|
export function LanguageSwitcher() {
|
||||||
|
|||||||
Reference in New Issue
Block a user