Package APIs
@i18n-micro/preact
Exported API of @i18n-micro/preact, generated from the source.
Preact bindings for i18n-micro — hooks, context, and UI components.
Entry points: @i18n-micro/preact, @i18n-micro/preact/router.
@i18n-micro/preact
Re-exports
Declared in another package of this repository and documented on its page.
- From
@i18n-micro/core:defaultPlural·interpolate·FormatService - From
@i18n-micro/react:I18nGroup·I18nLink·I18nProvider·I18nSwitcher·I18nT·useI18n·useI18nContext·useI18nDefaultLocale·useI18nLocales·useI18nRouter·useLocaleSwitch·useT·I18nConfigContext·I18nContext·I18nConfig·I18nGroupProps·I18nLinkProps·I18nProviderProps·I18nRoutingStrategy·I18nSwitcherProps·I18nTComponent·I18nTProps·RouteTarget·UseI18nOptions·UseI18nReturn - From
@i18n-micro/runtime:createI18n·PreactI18n(asI18n) ·PreactI18nOptions(asI18nOptions) - From
@i18n-micro/types:CleanTranslation·Getter·Locale·LocaleCode·ModuleOptions·Params·PluralFunc·TranslationKey·Translations
@i18n-micro/preact/router
Also exports, as @i18n-micro/preact does: I18nRoutingStrategy.
Functions
createBrowserHistoryAdapter
Adapter over the History API, for any router built on it (wouter, preact-router...). Links render
as <a>; I18nLink takes over plain clicks. A server has no address bar: pass the request's URL as
ssrUrl, so links and the switcher render for that page. In a browser the address bar wins.
function createBrowserHistoryAdapter(
locales: Locale[],
defaultLocale: string,
ssrUrl?: string,
): I18nRoutingStrategy
See Locale · I18nRoutingStrategy
Generated from the TypeScript sources and their JSDoc by pnpm run docs:generate.
Back to all packages · Integration guides