Skip to main content
Introducing packages.sweber.dev
Documentation menuLocales

Locales

The built-in wording in English, German, French and Italian, and how to change it.

Witness ships English, German, French and Italian. German and French use the formal address ("Sie", "vous"), Italian the informal one ("tu"), as is common on the web in each language. Witness Pro adds the other 20 official EU languages.

Kindendefrit
chatbotAI assistantKI-AssistentAssistant IAAssistente IA
generatedAI-generatedKI-generiertGénéré par IAGenerato con IA
editedAI-editedMit KI bearbeitetModifié par IAModificato con IA
deepfakeArtificially generatedKünstlich erzeugtGénéré artificiellementGenerato artificialmente
emotion-recognitionEmotion recognitionEmotionserkennungReconnaissance des émotionsRiconoscimento delle emozioni
biometric-categorisationBiometric categorisationBiometrische KategorisierungCatégorisation biométriqueCategorizzazione biometrica

Each kind also has a title and a body. The texts are in src/i18n.ts.

Changing the wording

Override single strings for a locale, for example the informal "du":

import { registerLocale } from "@sweberdev/witness";

registerLocale("de", {
  kinds: {
    chatbot: {
      title: "Du chattest mit einer KI",
      body: "Dieser Assistent ist ein KI-System und kein Mensch. Seine Antworten können falsch sein.",
    },
  },
});

registerLocale also adds new languages; anything missing falls back to English. In React, pass messages to WitnessProvider instead.

Keep the meaning when you rewrite: the person must understand that they are dealing with an AI, or that the content was generated or changed by one.