Files
youtube-music/src/i18n/index.ts
JellyBrick b53ece5836 feat: code splitting (#3593)
Co-authored-by: Angelos Bouklis <me@arjix.dev>
2025-07-12 00:00:03 +09:00

19 lines
439 B
TypeScript

import i18next, { init, t as i18t, changeLanguage } from 'i18next';
import { languageResources } from 'virtual:i18n';
export const loadI18n = async () =>
await init({
resources: await languageResources(),
lng: 'en',
fallbackLng: 'en',
interpolation: {
escapeValue: false,
},
});
export const setLanguage = async (language: string) =>
await changeLanguage(language);
export const t = i18t.bind(i18next);