mirror of
https://github.com/Dokploy/dokploy
synced 2025-06-26 18:27:59 +00:00
feat(i18n): replace translation in Appearance
This commit is contained in:
@@ -1,13 +1,11 @@
|
||||
import Cookies from "js-cookie";
|
||||
|
||||
const SUPPORTED_LOCALES = ["en", "zh-Hans"] as const;
|
||||
|
||||
type Locale = (typeof SUPPORTED_LOCALES)[number];
|
||||
type PossibleLocale = (typeof SUPPORTED_LOCALES)[number] | undefined | null;
|
||||
|
||||
export default function useLocale() {
|
||||
const currentLocale = Cookies.get("DOKPLOY_LOCALE") as PossibleLocale;
|
||||
|
||||
console.log(currentLocale);
|
||||
const currentLocale = (Cookies.get("DOKPLOY_LOCALE") ?? "en") as Locale;
|
||||
|
||||
const setLocale = (locale: Locale) => {
|
||||
Cookies.set("DOKPLOY_LOCALE", locale);
|
||||
|
||||
Reference in New Issue
Block a user