Files
Homarr/packages/translation/src/lang.ts
Thomas Camlong f1b1ec59ec chore: update prettier configuration for print width (#519)
* feat: update prettier configuration for print width

* chore: apply code formatting to entire repository

* fix: remove build files

* fix: format issue

---------

Co-authored-by: Meier Lukas <meierschlumpf@gmail.com>
2024-05-19 22:38:39 +02:00

14 lines
437 B
TypeScript

import { supportedLanguages } from ".";
const enTranslations = () => import("./lang/en");
export const languageMapping = () => {
const mapping: Record<string, unknown> = {};
for (const language of supportedLanguages) {
mapping[language] = () => import(`./lang/${language}`) as ReturnType<typeof enTranslations>;
}
return mapping as Record<(typeof supportedLanguages)[number], () => ReturnType<typeof enTranslations>>;
};