Skip to content

Build your personal knowledge base with Trilium Notes

feat(i18n/rtl): add an English with RTL enabled for testing

Elian Doran034ac59c9aa5
diff --git a/apps/client/src/widgets/collections/calendar/index.tsx b/apps/client/src/widgets/collections/calendar/index.tsx
index 3aa9fc1d60..c221555856 100644
--- a/apps/client/src/widgets/collections/calendar/index.tsx
+++ b/apps/client/src/widgets/collections/calendar/index.tsx
@@ -74,7 +74,8 @@ export const LOCALE_MAPPINGS: Record<LOCALE_IDS, (() => Promise<{ default: Local
pt: () => import("@fullcalendar/core/locales/pt"),
"pt_br": () => import("@fullcalendar/core/locales/pt-br"),
uk: () => import("@fullcalendar/core/locales/uk"),
- en: null
+ en: null,
+ "en_rtl": null,
};
export default function CalendarView({ note, noteIds }: ViewModeProps<CalendarViewData>) {
diff --git a/apps/server/src/services/i18n.ts b/apps/server/src/services/i18n.ts
index 1f1db1ac60..1199bd7960 100644
--- a/apps/server/src/services/i18n.ts
+++ b/apps/server/src/services/i18n.ts
@@ -12,6 +12,7 @@ export const DAYJS_LOADER: Record<LOCALE_IDS, () => Promise<typeof import("dayjs
"cn": () => import("dayjs/locale/zh-cn.js"),
"de": () => import("dayjs/locale/de.js"),
"en": () => import("dayjs/locale/en.js"),
+ "en_rtl": () => import("dayjs/locale/en.js"),
"es": () => import("dayjs/locale/es.js"),
"fa": () => import("dayjs/locale/fa.js"),
"fr": () => import("dayjs/locale/fr.js"),
diff --git a/packages/commons/src/lib/i18n.ts b/packages/commons/src/lib/i18n.ts
index 5970d2ab82..a6679f5427 100644
--- a/packages/commons/src/lib/i18n.ts
+++ b/packages/commons/src/lib/i18n.ts
@@ -23,6 +23,13 @@ const UNSORTED_LOCALES: Locale[] = [
{ id: "tw", name: "繁體中文", electronLocale: "zh_TW" },
{ id: "uk", name: "Українська", electronLocale: "uk" },
+ /**
+ * Development-only languages.
+ *
+ * These are only displayed while in dev mode, to test some language particularities (such as RTL) more easily.
+ */
+ { id: "en_rtl", name: "English (right-to-left) [dev]", electronLocale: "en", rtl: true },
+
/*
* Right to left languages
*