Refactor the Translations language to seperate their own directory, for easy to maintenable and scalable language

This commit is contained in:
Tola Leng
2025-05-23 20:39:25 +08:00
parent b4bef67220
commit 8910c1355c
40 changed files with 1416 additions and 618 deletions
+6 -5
View File
@@ -1,7 +1,6 @@
import { enTranslations } from './en';
import { kmTranslations } from './km';
import { deTranslations } from './de';
import enTranslations from './en';
import kmTranslations from './km';
import deTranslations from './de';
export type Language = "en" | "km" | "de";
@@ -11,4 +10,6 @@ export const translations = {
de: deTranslations,
};
export type TranslationKey = keyof typeof enTranslations;
// Type for accessing translations by module and key
export type TranslationModule = keyof typeof enTranslations;
export type TranslationKey<M extends TranslationModule> = keyof typeof enTranslations[M];