Package APIs

@i18n-micro/runtime

Exported API of @i18n-micro/runtime, generated from the source.

Framework-agnostic i18n runtime for vanilla TypeScript/JavaScript (browser and Node).

import { … } from '@i18n-micro/runtime'

Functions

createI18n

function createI18n(options: I18nOptions): I18n

See I18nOptions · I18n

fetchJsonTranslations

Fetch a JSON translation document from a URL (browser or any fetch-capable runtime).

function fetchJsonTranslations(url: string, init?: RequestInit): Promise<Translations>

See Translations

Classes

I18n

class I18n extends BaseI18n {
  constructor(options: I18nOptions)
}

See BaseI18n · I18nOptions

Types

I18nOptions

interface I18nOptions

LoadFromUrlEntry

interface LoadFromUrlEntry extends LoadFromUrlOptions
url
string required
locale
string required

See LoadFromUrlOptions

LoadFromUrlOptions

interface LoadFromUrlOptions
locale
string
routeName
string
init
RequestInit

Re-exports

Declared in another package of this repository and documented on its page.


Generated from the TypeScript sources and their JSDoc by pnpm run docs:generate. Back to all packages · Integration guides