Katlux Toolkit i18n & Localization

Learn how Katlux Toolkit components handle translations, zero-dependency fallbacks, and custom multi-language overrides.

Global & Multi-Language Configuration

Developers can override all component translation keys for any language in app.config.ts without installing external dependencies:

TS
// app.config.ts
export default defineAppConfig({
  katluxToolkit: {
    locale: 'de', // Default active locale when @nuxtjs/i18n is not present
    translations: {
      // German Language Overrides
      de: {
        'No result': 'Keine Ergebnisse gefunden',
        'Select an action': 'Aktion auswählen',
        'Apply': 'Anwenden',
        'Dismiss': 'Schließen',
        'Dialog Window': 'Dialogfenster'
      },
      // Spanish Language Overrides
      es: {
        'No result': 'No se encontraron resultados',
        'Apply': 'Aplicar',
        'Dismiss': 'Cerrar'
      }
    }
  }
})
Single-Language Flat Overrides

For single-language applications, flat key-value overrides are also supported directly in app.config.ts:

TS
export default defineAppConfig({
  katluxToolkit: {
    translations: {
      'No result': 'No records available',
      'Select an action': 'Choose action'
    }
  }
})