Installasjon
Slik installerer du i18n-error-base, og kravene for bruk.
Krav
- Et kjøremiljø som kan håndtere ES-moduler, f.eks. Node.js
valibot@^1.0.0kreves som peer-avhengighet
message følger lang fra Valibots getGlobalConfig().
Installasjon
npm install i18n-error-basepnpm add i18n-error-baseyarn add i18n-error-basebun add i18n-error-basenub add i18n-error-baseaube add i18n-error-baseHvis Valibot ikke er installert ennå, må du også legge det til.
npm install valibotpnpm add valibotyarn add valibotbun add valibotnub add valibotaube add valibotImport
import { I18nErrorBase, setErrorMessage } from "i18n-error-base";
import type { ErrorMeta, ErrorOptions, I18nErrorBaseParams, MessageFactory } from "i18n-error-base";
Neste trinn
Se Bruk for definisjon og grunnleggende språkbytte.