AdonisJS API
    Preparing search index...

    Type Alias BaseI18nConfig

    Base config shared between i18n config and i18n service config

    type BaseI18nConfig = {
        defaultLocale: string;
        supportedLocales?: string[];
        fallbackLocales?: Record<string, string>;
        fallback?: (identifier: string, locale: string) => string;
    }

    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.