AdonisJS API
    Preparing search index...

    Interface I18nManagerConfig

    Config for the package

    interface I18nManagerConfig {
        defaultLocale: string;
        supportedLocales?: string[];
        fallbackLocales?: Record<string, string>;
        fallback?: (identifier: string, locale: string) => string;
        formatter: FormatterFactory;
        loaders: LoaderFactory[];
    }

    Hierarchy (View Summary)

    Index
    defaultLocale: string

    Default locale for the application. This locale is used when request locale is not supported by the application

    supportedLocales?: string[]

    If not defined, we will rely on the translations to find the supported locales

    fallbackLocales?: Record<string, string>

    A collection of locales with their fallbacks. The fallback locales should be supported by the application

    fallback?: (identifier: string, locale: string) => string

    Add this function if you want to have control over what is returned when an identifier is missing.

    formatter: FormatterFactory

    Translations format to use

    loaders: LoaderFactory[]

    Configured loaders for loading translations