From 23b94da8f0f3cad681ef3fe6b4e4b7cee8941ae7 Mon Sep 17 00:00:00 2001 From: zsviczian Date: Fri, 24 Jan 2025 13:12:24 +0100 Subject: [PATCH] update LOCALE to read from localStorage --- src/constants/constants.ts | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/src/constants/constants.ts b/src/constants/constants.ts index ab7efaa..494c95f 100644 --- a/src/constants/constants.ts +++ b/src/constants/constants.ts @@ -26,7 +26,7 @@ export const ERROR_IFRAME_CONVERSION_CANCELED = "iframe conversion canceled"; declare const excalidrawLib: typeof ExcalidrawLib; -export const LOCALE = moment.locale(); +export const LOCALE = localStorage.getItem("language")?.toLowerCase() || "en"; export const CJK_FONTS = "CJK Fonts"; export const obsidianToExcalidrawMap: { [key: string]: string } = { @@ -446,4 +446,4 @@ export const SCRIPTENGINE_ICON = ``; export const EXPORT_IMG_ICON_NAME = `export-img`; -export const EXCALIDRAW_ICON = ``; \ No newline at end of file +export const EXCALIDRAW_ICON = ``;