# i18n diagnostics

<!-- Generated by docs/modules/diagnostics from the package catalogs. Write a guide in docs/diagnostics/<CODE>.md instead of editing this file. -->

Each i18n error has a stable `code`. Its `docs` link opens the page of that code. This page lists all 8 codes, and [All diagnostics](https://vitehub.dev/docs/reference/diagnostics) lists every primitive.

## Runtime errors

| Code | What happened |
| --- | --- |
| [`I18N_INVALID_TRANSLATION`](https://vitehub.dev/docs/i18n/diagnostics/i18n_invalid_translation) | The translation was not saved. \<problem\> |
| [`I18N_LOCALE_SUPERSEDED`](https://vitehub.dev/docs/i18n/diagnostics/i18n_locale_superseded) | A newer `setLocale()` call superseded the selection of `<locale>` before its catalog loaded. |
| [`I18N_UNKNOWN_LOCALE`](https://vitehub.dev/docs/i18n/diagnostics/i18n_unknown_locale) | `<locale>` is not one of the configured locales: \<value\>. |

## Configuration errors

| Code | What happened |
| --- | --- |
| [`I18N_INVALID_LOCALES`](https://vitehub.dev/docs/i18n/diagnostics/i18n_invalid_locales) | See the page of the code. |
| [`I18N_MACRO_NOT_COMPILED`](https://vitehub.dev/docs/i18n/diagnostics/i18n_macro_not_compiled) | `<name>` from `vite-hub/i18n` ran without the ViteHub build, so it has no message ID. |
| [`I18N_NO_WORKSPACE`](https://vitehub.dev/docs/i18n/diagnostics/i18n_no_workspace) | `useTranslations()` saves and publishes translations in a Workspace, and `i18n.workspace` is not set. |
| [`I18N_UNKNOWN_WORKSPACE`](https://vitehub.dev/docs/i18n/diagnostics/i18n_unknown_workspace) | `i18n.workspace` is \<workspace\>, and the app defines \<value\>. |
| [`I18N_UNSUPPORTED_HOST`](https://vitehub.dev/docs/i18n/diagnostics/i18n_unsupported_host) | i18n needs Nitro 3, which runs each request in an async context. Nuxt 4 builds the server with Nitro 2. |

<!-- vitehub-docs:section-links -->
## In this section

- [Overview](https://vitehub.dev/raw/docs/i18n.md)
- [Get started](https://vitehub.dev/raw/docs/i18n/get-started.md)
- [Configure](https://vitehub.dev/raw/docs/i18n/configure.md)
- [Server API](https://vitehub.dev/raw/docs/i18n/server-api.md)
- [Agent capability](https://vitehub.dev/raw/docs/i18n/agent-capability.md)
- [Limits and errors](https://vitehub.dev/raw/docs/i18n/limits-and-errors.md)

All pages: [llms.txt](https://vitehub.dev/llms.txt)
