fix: small refactor

This commit is contained in:
blagodaren
2024-12-28 13:57:30 +03:00
parent 8461046a4f
commit bab291a60b
2 changed files with 27 additions and 16 deletions

View File

@@ -8,15 +8,14 @@ import tt from "@/locales/tt.json";
import id from "@/locales/id.json";
import ar from "@/locales/ar.json";
const resources = {
en: { translation: en },
ru: { translation: ru },
zh: { translation: zh },
fa: { translation: fa },
tt: { translation: tt },
id: { translation: id },
ar: { translation: ar },
};
export const languages = { en, ru, zh, fa, tt, id, ar };
const resources = Object.fromEntries(
Object.entries(languages).map(([key, value]) => [
key,
{ translation: value },
]),
);
i18n.use(initReactI18next).init({
resources,