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
i18nkey innuxt.config, with type and default - Helpers —
$t,$tc,$tn,$td,$localePath,$switchLocale,$defineI18nRouteand the rest - Hooks — the
i18n:registerandi18n:beforeLocaleSwitchruntime hooks
Composables
useI18n— the helpers in<script setup>useI18nLocale— locale state and cookie in a custom detection pluginuseI18nHead— per-page overrides of the generated SEO tagsuseLocaleHead— the SEO tags as an object, for your ownuseHead
Components
<i18n-t>— one translation, with plural, formatting and slot interpolation<i18n-link>— aNuxtLinkto the localized route<i18n-switcher>— a locale dropdown<i18n-group>— a block with a shared key prefix
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.