API reference

Map of the nuxt-i18n-micro reference: module options, helpers, hooks, composables, components and package APIs.

This section lists every option, helper, hook, composable and component of the Nuxt module, plus the exported API of each @i18n-micro/* package. Use it to look up a signature or a default; the Guide explains how to use them. Most of it is generated from the source, so it matches the code.

Nuxt module

  • Module options — every i18n key in nuxt.config, with type and default
  • Helpers — $t, $tc, $tn, $td, $localePath, $switchLocale, $defineI18nRoute and the rest
  • Hooks — the i18n:register and i18n:beforeLocaleSwitch runtime hooks

Composables

  • useI18n — the helpers in <script setup>
  • useI18nLocale — locale state and cookie in a custom detection plugin
  • useI18nHead — per-page overrides of the generated SEO tags
  • useLocaleHead — the SEO tags as an object, for your own useHead

Components

Server

Nitro handlers use useTranslationServerMiddleware and useLocaleServerMiddleware, not the client helpers. See Server routes.

Packages

Package APIs lists the exports of every @i18n-micro/* package, one generated page each.

Getting started

Framework packages