---
title: "i18n Integration"
description: "Surface locale-aware content to AI agents with hreflang Link headers, locale-tagged frontmatter, and a localized llms.txt."
canonical_url: "https://nuxtseo.com/docs/ai-ready/guides/i18n"
last_updated: "2026-05-05T15:10:20.559Z"
---

If you have [`@nuxtjs/i18n`](https://i18n.nuxtjs.org/) (or `nuxt-i18n-micro`) installed, Nuxt AI Ready auto-detects locale data at build time and threads it through every layer of AI-readable output.

No configuration required: install the i18n module, configure your locales, and the integration activates.

## What Auto-Activates

<table>
<thead>
  <tr>
    <th>
      Surface
    </th>
    
    <th>
      Behavior
    </th>
  </tr>
</thead>

<tbody>
  <tr>
    <td>
      <strong>
        <code>
          llms.txt
        </code>
      </strong>
    </td>
    
    <td>
      Adds an <code>
        ## Available Languages on Website
      </code>
      
       section listing every locale, page count, and URL prefix. Default-locale pages stay inlined; other locales appear as references. (Anthropic precedent.)
    </td>
  </tr>
  
  <tr>
    <td>
      <strong>
        Markdown <code>
          Link
        </code>
        
         header
      </strong>
    </td>
    
    <td>
      Each <code>
        .md
      </code>
      
       and HTML response advertises <code>
        Link: <url>; rel="alternate"; hreflang="…"
      </code>
      
       per locale variant (RFC 8288).
    </td>
  </tr>
  
  <tr>
    <td>
      <strong>
        Frontmatter
      </strong>
    </td>
    
    <td>
      Markdown bodies include a <code>
        locale: …
      </code>
      
       field. The friendly 404 also lists <code>
        alternates
      </code>
      
      .
    </td>
  </tr>
  
  <tr>
    <td>
      <strong>
        Database
      </strong>
    </td>
    
    <td>
      Each indexed page persists its <code>
        locale
      </code>
      
       for filtered queries and reporting.
    </td>
  </tr>
  
  <tr>
    <td>
      <strong>
        FTS5 search
      </strong>
    </td>
    
    <td>
      Tokenizer auto-switches to <code>
        trigram
      </code>
      
       for CJK locales (zh / ja / ko); <code>
        unicode61 remove_diacritics 2
      </code>
      
       otherwise.
    </td>
  </tr>
</tbody>
</table>

## URL Strategies

Locale resolution honors the i18n strategy:

- `prefix_except_default`: `/about` (default), `/fr/about`, `/de/about`
- `prefix`: `/en/about`, `/fr/about`
- `prefix_and_default`: both prefixed and unprefixed defaults
- `no_prefix`: every route belongs to the default locale

The module derives the locale from the route prefix at index time and re-derives it at request time for `Link` header generation, so behaviour stays correct as you add routes dynamically.

## Example llms.txt

```txt [llms.txt]
# Acme Docs

> Documentation for Acme.

Canonical Origin: https://acme.example

## Available Languages on Website

- English (en) - 142 pages - / - Content included below
- Français (fr) - 142 pages - /fr - Visit website for content
- 日本語 (ja) - 80 pages - /ja - Visit website for content

## LLM Resources

- [Full Content](https://acme.example/llms-full.txt)
  Complete page content in markdown format.
- [sitemap.xml](/sitemap.xml)
  XML sitemap for search engines and crawlers.

## Pages

- [Home](/)
- [About](/about)
…
```

## Example Response Headers

```http
GET /fr/about.md

content-type: text/markdown; charset=utf-8
vary: Accept, Sec-Fetch-Dest
link: </fr/about>; rel="alternate"; type="text/html",
      </about.md>; rel="alternate"; hreflang="en",
      </fr/about.md>; rel="alternate"; hreflang="fr-FR"
```

## Example Frontmatter

```md [/fr/about.md]
---
title: "À propos"
description: "À propos d'Acme."
canonical_url: "https://acme.example/fr/about"
last_updated: "2026-04-25T13:48:00.000Z"
locale: "fr"
---

# À propos
…
```

## Disabling Auto-Detection

Set `autoI18n: false` to skip integration even with an i18n module present:

```ts [nuxt.config.ts]
export default defineNuxtConfig({
  aiReady: {
    autoI18n: false,
  },
})
```

## Behaviour Notes

- Only the **default locale's** page list stays inlined in `llms.txt`. Other locales remain discoverable via the Available Languages header and `hreflang` alternates. This follows the Anthropic pattern, chosen to keep the file small and let agents fetch translated content from the same routing they'd use as a normal client.
- `Link rel="alternate" hreflang="..."` ships on every markdown and HTML response, so headless agents discover language variants without parsing HTML.
- The `locale` column carries the **locale code** (e.g. `fr`), not the BCP-47 hreflang tag (`fr-FR`). Both surface in headers: the code in frontmatter, the hreflang in `Link`.

## Compatibility

- Requires [`@nuxtjs/i18n`](https://i18n.nuxtjs.org/) v8 or higher (or `nuxt-i18n-micro`).
- Detection uses the same helper [`@nuxtjs/sitemap`](https://nuxtseo.com/sitemap) uses, so behaviour is consistent across Nuxt SEO modules.
