@nospamproxy/core
    Preparing search index...

    Class I18nBackend<TOptions>

    An i18n backend to fetch translation files from the server.

    The following options are supported:

    • httpClient <HttpClient> - Must be a http client instance from the "@aurelia/fetch-client" package.
    • path? <(language: string) => string> - Optional. A function for computing the path for translation files. The default uses paths like "/<language>/translation.json".

    Type Parameters

    Implements

    Index

    Constructors

    Properties

    defaultNs: string
    httpClient: IHttpClient
    path: (language: string) => string
    services: any
    type: "backend" = ...
    type: "backend" = ...

    Methods

    • Save the missing translation

      Parameters

      • _languages: string[]
      • _namespace: string
      • _key: string
      • _fallbackValue: string

      Returns void

    • Parameters

      • services: Services
      • options: TOptions
      • i18nextOptions: InitOptions

      Returns void

    • Parameters

      • language: string
      • namespace: string

      Returns Promise<ResourceKey>

    • Parameters

      • language: string
      • namespace: string
      • callback: ReadCallback

      Returns Promise<void>