Spring til indhold
i18n-error-base
Dansk
Esc
↑↓navigér↵åbn⌘Jforhåndsvis
På denne side

Installation

Sådan installeres i18n-error-base samt krav til brug.

Krav

  • Et kørselsmiljø, der kan håndtere ES-moduler, f.eks. Node.js
  • valibot@^1.0.0 kræves som peer-afhængighed

message følger lang fra Valibots getGlobalConfig().

Installation

npm install i18n-error-base
pnpm add i18n-error-base
yarn add i18n-error-base
bun add i18n-error-base
nub add i18n-error-base
aube add i18n-error-base

Hvis Valibot ikke er installeret endnu, skal du også tilføje det.

npm install valibot
pnpm add valibot
yarn add valibot
bun add valibot
nub add valibot
aube add valibot

Import

import { I18nErrorBase, setErrorMessage } from "i18n-error-base";
import type { ErrorMeta, ErrorOptions, I18nErrorBaseParams, MessageFactory } from "i18n-error-base";

Næste trin

Se Brug for definition og grundlæggende sprogskift.

Var denne side nyttig?