AdonisJS API
    Preparing search index...

    Variable edgePluginI18nConst

    edgePluginI18n: (i18n: I18nManager) => PluginFn<undefined> = ...

    Edge template engine plugin for AdonisJS I18n integration. Adds global helpers and functions for accessing translations in templates.

    Provides the following global helpers:

    • i18n: Default I18n instance for the default locale
    • t(): Translation function that uses the current I18n context
    • getDefaultLocale(): Returns the default locale string
    • getSupportedLocales(): Returns array of supported locales

    Type Declaration

      • (i18n: I18nManager): PluginFn<undefined>
      • Parameters

        • i18n: I18nManager

          The I18nManager instance to integrate with Edge

        Returns PluginFn<undefined>

        Edge plugin function

    // In Edge template:
    {{ t('hello.world', { name: 'John' }) }}
    {{ getDefaultLocale() }}
    {{ getSupportedLocales() }}