@scml/mod-i18n

TypeScript type definitions for DoL i18n mod, handling translation and localization data.

Installation

npm
yarn
pnpm
bun
deno
npm install -D @scml/mod-i18n

Quick Start

Add type reference

/// <reference types="@scml/mod-i18n" />

Use global instance

modI18N is mounted on window.

Import types on demand

import type { ModI18N } from '@scml/mod-i18n/I18N';
import type { GetPromiseWithResolvers } from '@scml/mod-i18n/GetPromiseWithResolvers';

Global Types global

PropertyTypeDescription
modI18NModI18NDoL i18n mod instance
Main entry
Subpath import
/// <reference types="@scml/mod-i18n" />

Subpath Exports

SubpathDescription
.Main entry, augments Window/global
./I18NModI18N main class
./GetPromiseWithResolversPromise resolver helper
./TypeBi18n input/output types

API Reference

./I18N

ModI18N class

Main i18n class. Properties: modUtils, modSC2DataManager, logger, idbRef, idbKeyValRef, typeB. Methods: patchVersionString(), readZipStream(), readZipSelf(), checkItem(), etc.

Type Definition Source

INFO