Initializes the internationalization (i18n) engine with provided translation resources.
Sets up resource loading via HttpApi, language detection, namespace usage, and fallback options.
Parameters
loadPath: string
The root path to translation JSON files (e.g. 'locales'), used for backend loading.
Optionalns: string[] = []
Optional array of namespaces to load for translations.
Returns Promise<any>
Resolves to the configured i18next instance after initialization.
Async
Example
// Loads 'locales/en/common.json' and other namespaces consti18n = awaitinitI18n('./locales', ['common', 'glossary']);
Initializes the internationalization (i18n) engine with provided translation resources. Sets up resource loading via HttpApi, language detection, namespace usage, and fallback options.