Stratal API Reference
    Preparing search index...

    Interface I18nModuleOptions

    Options for configuring the I18n module

    I18nModule.withRoot({
    defaultLocale: 'en',
    fallbackLocale: 'en',
    locales: ['en', 'fr'],
    messages: {
    en: { common: { hello: 'Hello' } },
    fr: { common: { hello: 'Bonjour' } }
    }
    })
    interface I18nModuleOptions {
        defaultLocale?: string;
        fallbackLocale?: string;
        locales?: string[];
        messages?: Record<string, Record<string, unknown>>;
    }
    Index

    Properties

    defaultLocale?: string

    Default locale for the application Used when no locale is specified in request headers

    'en'
    
    fallbackLocale?: string

    Fallback locale when translation is missing

    'en'
    
    locales?: string[]

    List of supported locales Request locales not in this list will fall back to defaultLocale

    messages?: Record<string, Record<string, unknown>>

    Application-specific messages to merge with system messages Keys are locale codes, values are message objects