import { SupportedLanguages } from '@/lib/i18n'; import enAuth from '@/modules/auth/locales/auth-en.json'; import enApp from '@/modules/app/locales/app-en.json'; import enLanding from '@/modules/landing/locales/landing-en.json'; import enCommon from '@/locales/en/common.json'; import enTheme from '@/locales/en/theme.json'; import jaAuth from '@/modules/auth/locales/auth-ja.json'; import jaApp from '@/modules/app/locales/app-ja.json'; import jaLanding from '@/modules/landing/locales/landing-ja.json'; import jaCommon from '@/locales/ja/common.json'; import jaTheme from '@/locales/ja/theme.json'; export const mergeTranslations = (lang: SupportedLanguages) => { if (lang === 'en') { return { auth: { ...enAuth }, app: { ...enApp }, landing: { ...enLanding }, common: { ...enCommon }, theme: { ...enTheme }, }; } else { return { auth: { ...jaAuth }, app: { ...jaApp }, landing: { ...jaLanding }, common: { ...jaCommon }, theme: { ...jaTheme }, }; } };