@lifi/wallet-management
Version:
LI.FI Wallet Management solution.
11 lines (8 loc) • 390 B
text/typescript
import type { enResource } from './enResource.js'
import type { LanguageKey } from './types.js'
type LanguageResource = typeof enResource
// Dynamically import the JSON file for the specified language
export async function loadLocale(lng: LanguageKey) {
const languageResourceModule = await import(`../../i18n/${lng}.json`)
return languageResourceModule.default as LanguageResource
}