Supported locales, catalogues (or a source), and the resolution, formatting and route settings
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}' },
},
}),
],
});
Creates the LocalizationPlugin.