Setu-TS
    Preparing search index...

    Function LocalizationPlugin

    • Creates the LocalizationPlugin.

      Parameters

      • options: LocalizationPluginOptions

        Supported locales, catalogues (or a source), and the resolution, formatting and route settings

      Returns IPlugin

      The plugin instance

      If an option is malformed: an empty or invalid supportedLocales, both or neither of catalogues/source, an unknown timeZone, a non-integer middleware.priority, or a bad exposeCatalogues.basePath

      import { createApplication } from '@setu-ts/kernel';
      import { RuntimePlugin } from '@setu-ts/runtime';
      import { LocalizationPlugin } from '@setu-ts/localization-plugin';

      const app = createApplication({
      plugins: [
      RuntimePlugin(),
      LocalizationPlugin({
      supportedLocales: ['en', 'de'],
      catalogues: {
      en: { greeting: 'Hello {name}' },
      de: { greeting: 'Hallo {name}' },
      },
      }),
      ],
      });

      0.9.0