3D-City Model
    Preparing search index...

    Function initI18n

    • 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.

      // Loads 'locales/en/common.json' and other namespaces
      const i18n = await initI18n('./locales', ['common', 'glossary']);