HomeSandboxShowcaseAppDocBlog
    • EnglishEnglish
      EN
    • русскийRussian
      RU
    • 日本語Japanese
      JA
    • françaisFrench
      FR
    • 한국어Korean
      KO
    • 中文Chinese
      ZH
    • españolSpanish
      ES
    • DeutschGerman
      DE
    • العربيةArabic
      AR
    • italianoItalian
      IT
    • British EnglishBritish English
      EN-GB
    • portuguêsPortuguese
      PT
    • हिन्दीHindi
      HI
    • TürkçeTurkish
      TR
    • polskiPolish
      PL
    • IndonesiaIndonesian
      ID
    • Tiếng ViệtVietnamese
      VI
    • українськаUkrainian
      UK
    /
    Filter docs by framework
    Alt+←
    Why Intlayer ?
    Get Started
    Concept
    • How Intlayer Works
    • Configuration
    • TestFillBuildWatchExtractLoginPushPullConfigurationListVersionEditorLiveDebugDoc ReviewDoc TranslateSDK
    • Visual Editor
    • CMS
    • CI/CD Integration
    • TranslationPluralEnumerationConditionGenderInsertionFileNestingMarkdownHTMLFunction Fetching
    • Per Locale File
    • Compiler
    • Auto Fill
    • Testing
    • Bundle Optimization
    Environment
    • Next.js 14 and App Router
      Next.js 15
      Next.js no locale path
      Next.js and Page Router
      Compiler
    • Tanstack Start Solid
    • Astro and React
      Astro and Svelte
      Astro and Vue
      Astro and Solid
      Astro and Preact
      Astro and Lit
      Astro and Vanilla JS
    • React Router v7
      React Router v7 (fs-routes)
      Compiler
    • Nuxt and Vue
    • Vite and Solid
    • SvelteKit
    • Vite and Preact
    • Vite and Vanilla JS
    • Vite and Lit
    • Angular 19 (Webpack)
      Analog
    • React CRA
    • React Native and Expo
    • Express.js
      NestJS
      Fastify
      Hono
      Adonis
    • Lynx and React
    Plugins
    • JSON
    • gettext (.po)
    VS Code Extension
    Agent
    • MCP Server
    • Agent skills
    Releases
    • v8
    • v7
    • v6
    Benchmark
    • Next.js
    • TanStack
    • Vue
    • Solid
    • Svelte
    Blog
    Ask a question
    1. Documentation
    2. Environment
    3. Nuxt and vue
    \n\n\n```\n\n#### Accessing Content in Intlayer\n\nIntlayer offers different APIs to access your content:\n\n- **Component-based syntax** (recommended):\n Use the ``, or `` syntax to render content as an Intlayer Node. This integrates seamlessly with the [Visual Editor](/doc/concept/editor) and [CMS](/doc/concept/cms).\n\n- **String-based syntax**:\n Use `{{ myContent }}` to render the content as plain text, without Visual Editor support.\n\n- **Raw HTML syntax**:\n Use `
    ` to render the content as raw HTML, without Visual Editor support.\n\n- **Destructuration syntax**:\n The `useIntlayer` composable returns an Proxy with the content. This proxy can be destructured to access the content while keeping the reactivity.\n - Use `const content = useIntlayer(\"myContent\");` And `{{ content.myContent }}` / ``.\n - Or use `const { myContent } = useIntlayer(\"myContent\");` And `{{ myContent}}` / `` to destructure the content.\n\n### (Optional) Step 6: Change the language of your content\n\nTo change the language of your content, you can use the `setLocale` function provided by the `useLocale` composable. This function allows you to set the locale of the application and update the content accordingly.\n\nCreate a component to switch between languages using `NuxtLink`. **Using links instead of buttons for locale switching is a best practice for SEO and page discoverability**, as it allows search engines to crawl and index all localized versions of your pages:\n\n```vue fileName=\"components/LocaleSwitcher.vue\"\n\n\n\n```\n\n> Using `NuxtLink` with proper `href` attributes (via `getLocalizedUrl`) ensures that search engines can discover all language variants of your pages. This is preferable to JavaScript-only locale switching, which search engine crawlers may not follow.\n\nThen, set up your `app.vue` to use layouts:\n\n```vue fileName=\"app.vue\"\n\n```\n\n### (Optional) Step 6b: Create a Layout with Navigation\n\nNuxt layouts allow you to define a common structure for your pages. Create a default layout that includes the locale switcher and navigation:\n\n```vue fileName=\"layouts/default.vue\"\n\n\n\n```\n\nThe `Links` component (shown below) ensures that internal navigation links are automatically localized.\n\n### (Optional) Step 7: Add localized Routing to your application\n\nNuxt automatically handles localized routing when using the `nuxt-intlayer` module. This creates routes for each language automatically based on your pages directory structure.\n\nExample:\n\n```plaintext\npages/\n├── index.vue → /, /fr, /es\n├── about.vue → /about, /fr/about, /es/about\n└── contact/\n └── index.vue → /contact, /fr/contact, /es/contact\n```\n\nTo create localized pages, simply create your Vue files in the `pages/` directory. Here are two example pages:\n\n**Home page (`pages/index.vue`):**\n\n```vue fileName=\"pages/index.vue\"\n\n\n\n```\n\n**About page (`pages/about.vue`):**\n\n```vue fileName=\"pages/about.vue\"\n\n\n\n```\n\n> Note: `useHead` is auto-imported in Nuxt. You can access content values using either `.value` (reactive) or `.raw` (primitive string) depending on your needs.\n\nThe `nuxt-intlayer` module will automatically:\n\n- Detect the user's preferred locale\n- Handle locale switching via URL\n- Set the appropriate `` attribute\n- Manage locale cookies\n- Redirect users to the appropriate localized URL\n\n### (Optional) Step 8: Creating a Localized Link Component\n\nTo ensure that your application's navigation respects the current locale, you can create a custom `Links` component. This component automatically prefixes internal URLs with the current language, which is essential for **SEO and page discoverability**.\n\n```vue fileName=\"components/Links.vue\"\n\n\n\n```\n\nThen use this component throughout your application:\n\n```vue fileName=\"layouts/default.vue\"\n\n\n\n```\n\n> By using `NuxtLink` with localized paths, you ensure that:\n>\n> - Search engines can crawl and index all language versions of your pages\n> - Users can share localized URLs directly\n> - Browser history works correctly with locale-prefixed URLs\n\n### (Optional) Step 9: Handle Metadata and SEO\n\nNuxt provides excellent SEO capabilities via the `useHead` composable (auto-imported). You can use Intlayer to handle localized metadata using the `.raw` or `.value` accessor to get the primitive string value:\n\n```vue fileName=\"pages/about.vue\"\n\n\n\n```\n\n> Alternatively, you can use the `import { getIntlayer } from \"intlayer\"` function to get the content without Vue reactivity.\n\n> **Accessing content values:**\n>\n> - Use `.raw` to get the primitive string value (non-reactive)\n> - Use `.value` to get the reactive value\n> - Use `` component syntax for Visual Editor support\n\nCreate the corresponding content declaration:\n\n```ts fileName=\"pages/about-page.content.ts\" contentDeclarationFormat={[\"typescript\", \"esm\", \"commonjs\"]}\nimport { t, type Dictionary } from \"intlayer\";\n\nconst aboutPageContent = {\n key: \"about-page\",\n content: {\n metaTitle: t({\n en: \"About Us - My Company\",\n fr: \"À Propos - Ma Société\",\n es: \"Acerca de Nosotros - Mi Empresa\",\n }),\n metaDescription: t({\n en: \"Learn more about our company and our mission\",\n fr: \"En savoir plus sur notre société et notre mission\",\n es: \"Conozca más sobre nuestra empresa y nuestra misión\",\n }),\n title: t({\n en: \"About Us\",\n fr: \"À Propos\",\n es: \"Acerca de Nosotros\",\n }),\n },\n} satisfies Dictionary;\n\nexport default aboutPageContent;\n```\n\n```json fileName=\"pages/about-page.content.json\" contentDeclarationFormat=\"json\"\n{\n \"$schema\": \"https://intlayer.org/schema.json\",\n \"key\": \"about-page\",\n \"content\": {\n \"metaTitle\": {\n \"nodeType\": \"translation\",\n \"translation\": {\n \"en\": \"About Us - My Company\",\n \"fr\": \"À Propos - Ma Société\",\n \"es\": \"Acerca de Nosotros - Mi Empresa\"\n }\n },\n \"metaDescription\": {\n \"nodeType\": \"translation\",\n \"translation\": {\n \"en\": \"Learn more about our company and our mission\",\n \"fr\": \"En savoir plus sur notre société et notre mission\",\n \"es\": \"Conozca más sobre nuestra empresa y nuestra misión\"\n }\n },\n \"title\": {\n \"nodeType\": \"translation\",\n \"translation\": {\n \"en\": \"About Us\",\n \"fr\": \"À Propos\",\n \"es\": \"Acerca de Nosotros\"\n }\n }\n }\n}\n```\n\n### Git Configuration\n\nIt is recommended to ignore the files generated by Intlayer. This allows you to avoid committing them to your Git repository.\n\nTo do this, you can add the following instructions to your `.gitignore` file:\n\n```plaintext fileName=\".gitignore\"\n# Ignore the files generated by Intlayer\n.intlayer\n```\n\n### VS Code Extension\n\nTo improve your development experience with Intlayer, you can install the official **Intlayer VS Code Extension**.\n\n[Install from the VS Code Marketplace](https://marketplace.visualstudio.com/items?itemName=intlayer.intlayer-vs-code-extension)\n\nThis extension provides:\n\n- **Autocompletion** for translation keys.\n- **Real-time error detection** for missing translations.\n- **Inline previews** of translated content.\n- **Quick actions** to easily create and update translations.\n\nFor more details on how to use the extension, refer to the [Intlayer VS Code Extension documentation](https://intlayer.org/doc/vs-code-extension).\n\n---\n\n### Go Further\n\nTo go further, you can implement the [visual editor](/doc/concept/editor) or externalize your content using the [CMS](/doc/concept/cms).\n","about":"Discover how to make your Nuxt and Vue website multilingual. Follow the documentation to internationalize (i18n) and translate it.","url":"https://intlayer.org/doc/environment/nuxt-and-vue","datePublished":"18-06-2025","dateModified":"06-05-2026","keywords":"Internationalization, Documentation, Intlayer, Nuxt, Vue, JavaScript","license":"https://raw.githubusercontent.com/aymericzip/intlayer/refs/heads/main/LICENSE","audience":{"@type":"Audience","audienceType":"Developers, Content Managers"}}
    Creation:2025-06-18Last update:2026-05-06
    See the application template on GitHub

    This page has an application template available.

    See the showcase application

    This page links to a live demo of the template.

    Watch the video tutorial

    This page has a video tutorial available.

    Reference this doc to your favorite AI assistant
    ChatGPT
    Claude
    DeepSeek
    Google AI mode
    Gemini
    Perplexity
    Mistral
    Grok

    Ask your question and get a summary of the document by referencing this page and the AI provider of your choice

    Version History

    1. "Update Solid useIntlayer API usage to direct property access"
      v8.9.05/4/2026
    2. "Add init command"
      v7.5.912/30/2025
    3. "Unused TypeScript configuration"
      v7.3.1312/8/2025
    4. "Update LocaleSwitcher, SEO, metadata"
      v7.3.1112/7/2025
    5. "Initial history"
      v5.5.106/29/2025
    Edit this doc

    If you have an idea for improving this documentation, please feel free to contribute by submitting a pull request on GitHub.

    GitHub link to the documentation
    Copy

    Copy doc Markdown to clipboard

    Translate your Nuxt and Vue website using Intlayer | Internationalization (i18n)

    Table of Contents

    What is Intlayer?

    Intlayer is an innovative, open-source internationalization (i18n) library designed to simplify multilingual support in modern web applications.

    With Intlayer, you can:

    • Easily manage translations using declarative dictionaries at the component level.
    • Dynamically localize metadata, routes, and content.
    • Ensure TypeScript support with autogenerated types, improving autocompletion and error detection.
    • Benefit from advanced features, like dynamic locale detection and switching.

    Step-by-Step Guide to Set Up Intlayer in a Nuxt Application

    www.youtube.com
    ide.intlayer.org
    intlayer-nuxt-4-template.vercel.app

    See Application Template on GitHub.

    Step 1: Install Dependencies

    Install the necessary packages using npm:

    bash
    Copy code

    Copy the code to the clipboard

    npm install intlayer vue-intlayernpm install --save-dev nuxt-intlayernpx intlayer init
    • intlayer

      The core package that provides internationalization tools for configuration management, translation, content declaration, transpilation, and CLI commands.

    • vue-intlayer The package that integrates Intlayer with Vue application. It the composables for the Vue components.

    • nuxt-intlayer The Nuxt module that integrates Intlayer with Nuxt applications. It provides automatic setup, middleware for locale detection, cookie management, and URL redirection.

    Step 2: Configuration of your project

    Create a config file to configure the languages of your application:

    intlayer.config.ts
    Copy code

    Copy the code to the clipboard

    import { Locales, type IntlayerConfig } from "intlayer";
    
    const config: IntlayerConfig = {
      internationalization: {
        locales: [
          Locales.ENGLISH,
          Locales.FRENCH,
          Locales.SPANISH,
          // Your other locales
        ],
        defaultLocale: Locales.ENGLISH,
      },
    };
    
    export default config;
    Through this configuration file, you can set up localized URLs, middleware redirection, cookie names, the location and extension of your content declarations, disable Intlayer logs in the console, and more. For a complete list of available parameters, refer to the configuration documentation.

    Step 3: Integrate Intlayer in Your Nuxt Configuration

    Add the intlayer module to your Nuxt configuration:

    nuxt.config.ts
    Copy code

    Copy the code to the clipboard

    import { defineNuxtConfig } from "nuxt/config";export default defineNuxtConfig({  // ... Your existing Nuxt configuration  modules: ["nuxt-intlayer"],});
    The nuxt-intlayer module automatically handles the integration of Intlayer with Nuxt. It sets up the content declaration building, monitors files in development mode, provides middleware for locale detection, and manages localized routing.

    Step 4: Declare Your Content

    Create and manage your content declarations to store translations:

    Your content declarations can be defined anywhere in your application as long as they are included in the contentDir directory (by default, ./src). And match the content declaration file extension (by default, .content.{json,ts,tsx,js,jsx,mjs,cjs}).
    For more details, refer to the content declaration documentation.

    Step 5: Utilize Intlayer in Your Code

    Access your content dictionaries throughout your Nuxt application using the useIntlayer composable:

    components/HelloWorld.vue
    Copy code

    Copy the code to the clipboard

    <script setup lang="ts">import { ref } from "vue";import { useIntlayer } from "vue-intlayer";defineProps({  msg: String,});const {  count,  edit,  checkOut,  nuxtIntlayer,  learnMore,  nuxtDocs,  readTheDocs,} = useIntlayer("helloworld");const countRef = ref(0);</script><template>  <h1>{{ msg }}</h1>  <div class="card">    <button type="button" @click="countRef++">      <count />      {{ countRef }}    </button>    <p v-html="edit"></p>  </div>  <p>    <checkOut />    <a href="https://nuxt.com/docs/getting-started/introduction" target="_blank"      >Nuxt</a    >, <nuxtIntlayer />  </p>  <p>    <learnMore />    <a href="https://nuxt.com" target="_blank"><nuxtDocs /></a>.  </p>  <p class="read-the-docs"><readTheDocs /></p>  <p class="read-the-docs">{{ readTheDocs }}</p></template>

    Accessing Content in Intlayer

    Intlayer offers different APIs to access your content:

    • Component-based syntax (recommended): Use the <myContent />, or <Component :is="myContent" /> syntax to render content as an Intlayer Node. This integrates seamlessly with the Visual Editor and CMS.

    • String-based syntax: Use {{ myContent }} to render the content as plain text, without Visual Editor support.

    • Raw HTML syntax: Use <div v-html="myContent" /> to render the content as raw HTML, without Visual Editor support.

    • Destructuration syntax: The useIntlayer composable returns an Proxy with the content. This proxy can be destructured to access the content while keeping the reactivity.

      • Use const content = useIntlayer("myContent"); And {{ content.myContent }} / <content.myContent />.
      • Or use const { myContent } = useIntlayer("myContent"); And {{ myContent}} / <myContent/> to destructure the content.

    (Optional) Step 6: Change the language of your content

    To change the language of your content, you can use the setLocale function provided by the useLocale composable. This function allows you to set the locale of the application and update the content accordingly.

    Create a component to switch between languages using NuxtLink. Using links instead of buttons for locale switching is a best practice for SEO and page discoverability, as it allows search engines to crawl and index all localized versions of your pages:

    components/LocaleSwitcher.vue
    Copy code

    Copy the code to the clipboard

    <script setup lang="ts">import { getLocaleName, getLocalizedUrl } from "intlayer";import { useLocale } from "vue-intlayer";// Nuxt auto-imports useRouteconst route = useRoute();const { locale, availableLocales, setLocale } = useLocale();</script><template>  <nav class="locale-switcher">    <NuxtLink      v-for="localeEl in availableLocales"      :key="localeEl"      :to="getLocalizedUrl(route.fullPath, localeEl)"      class="locale-link"      :class="{ 'active-locale': localeEl === locale }"      @click="setLocale(localeEl)"    >      {{ getLocaleName(localeEl) }}    </NuxtLink>  </nav></template>
    Using NuxtLink with proper href attributes (via getLocalizedUrl) ensures that search engines can discover all language variants of your pages. This is preferable to JavaScript-only locale switching, which search engine crawlers may not follow.

    Then, set up your app.vue to use layouts:

    app.vue
    Copy code

    Copy the code to the clipboard

    <template>  <NuxtLayout>    <NuxtPage />  </NuxtLayout></template>

    (Optional) Step 6b: Create a Layout with Navigation

    Nuxt layouts allow you to define a common structure for your pages. Create a default layout that includes the locale switcher and navigation:

    layouts/default.vue
    Copy code

    Copy the code to the clipboard

    <script setup lang="ts">import Links from "~/components/Links.vue";import LocaleSwitcher from "~/components/LocaleSwitcher.vue";</script><template>  <div>    <header>      <LocaleSwitcher />    </header>    <main>      <slot />    </main>    <Links href="/">Home</Links>    <Links href="/about">About</Links>  </div></template>

    The Links component (shown below) ensures that internal navigation links are automatically localized.

    (Optional) Step 7: Add localized Routing to your application

    Nuxt automatically handles localized routing when using the nuxt-intlayer module. This creates routes for each language automatically based on your pages directory structure.

    Example:

    plaintext
    Copy code

    Copy the code to the clipboard

    pages/├── index.vue          → /, /fr, /es├── about.vue          → /about, /fr/about, /es/about└── contact/    └── index.vue      → /contact, /fr/contact, /es/contact

    To create localized pages, simply create your Vue files in the pages/ directory. Here are two example pages:

    Home page (pages/index.vue):

    pages/index.vue
    Copy code

    Copy the code to the clipboard

    <script setup lang="ts">import { useIntlayer } from "vue-intlayer";const content = useIntlayer("home-page");useHead({  title: content.metaTitle.raw,  meta: [    {      name: "description",      content: content.metaDescription.raw,    },  ],});</script><template>  <h1><content.title /></h1></template>

    About page (pages/about.vue):

    pages/about.vue
    Copy code

    Copy the code to the clipboard

    <script setup lang="ts">import { useIntlayer } from "vue-intlayer";const content = useIntlayer("about-page");useHead({  title: content.metaTitle.raw, // Use .raw for primitive string access  meta: [    {      name: "description",      content: content.metaDescription.raw, // Use .raw for primitive string access    },  ],});</script><template>  <h1><content.title /></h1></template>
    Note: useHead is auto-imported in Nuxt. You can access content values using either .value (reactive) or .raw (primitive string) depending on your needs.

    The nuxt-intlayer module will automatically:

    • Detect the user's preferred locale
    • Handle locale switching via URL
    • Set the appropriate <html lang=""> attribute
    • Manage locale cookies
    • Redirect users to the appropriate localized URL

    (Optional) Step 8: Creating a Localized Link Component

    To ensure that your application's navigation respects the current locale, you can create a custom Links component. This component automatically prefixes internal URLs with the current language, which is essential for SEO and page discoverability.

    components/Links.vue
    Copy code

    Copy the code to the clipboard

    <script setup lang="ts">import { getLocalizedUrl } from "intlayer";import { useLocale } from "vue-intlayer";interface Props {  href: string;  locale?: string;}const props = defineProps<Props>();const { locale: currentLocale } = useLocale();// Compute the final pathconst finalPath = computed(() => {  // 1. Check if the link is external  const isExternal = /^https?:\/\//.test(props.href || "");  // 2. If external, return as is (NuxtLink handles the <a> tag generation)  if (isExternal) return props.href;  // 3. If internal, localize the URL  const targetLocale = props.locale || currentLocale.value;  return getLocalizedUrl(props.href, targetLocale);});</script><template>  <NuxtLink :to="finalPath" v-bind="$attrs">    <slot />  </NuxtLink></template>

    Then use this component throughout your application:

    layouts/default.vue
    Copy code

    Copy the code to the clipboard

    <script setup lang="ts">import Links from "~/components/Links.vue";import LocaleSwitcher from "~/components/LocaleSwitcher.vue";</script><template>  <div>    <header>      <LocaleSwitcher />    </header>    <main>      <slot />    </main>    <Links href="/">Home</Links>    <Links href="/about">About</Links>  </div></template>

    By using NuxtLink with localized paths, you ensure that:

    • Search engines can crawl and index all language versions of your pages
    • Users can share localized URLs directly
    • Browser history works correctly with locale-prefixed URLs

    (Optional) Step 9: Handle Metadata and SEO

    Nuxt provides excellent SEO capabilities via the useHead composable (auto-imported). You can use Intlayer to handle localized metadata using the .raw or .value accessor to get the primitive string value:

    pages/about.vue
    Copy code

    Copy the code to the clipboard

    <script setup lang="ts">import { useIntlayer } from "vue-intlayer";// useHead is auto-imported in Nuxtconst content = useIntlayer("about-page");useHead({  title: content.metaTitle.raw, // Use .raw for primitive string access  meta: [    {      name: "description",      content: content.metaDescription.raw, // Use .raw for primitive string access    },  ],});</script><template>  <h1><content.title /></h1></template>
    Alternatively, you can use the import { getIntlayer } from "intlayer" function to get the content without Vue reactivity.

    Accessing content values:

    • Use .raw to get the primitive string value (non-reactive)
    • Use .value to get the reactive value
    • Use <content.key /> component syntax for Visual Editor support

    Create the corresponding content declaration:

    pages/about-page.content.ts
    Copy code

    Copy the code to the clipboard

    import { t, type Dictionary } from "intlayer";
    
    const aboutPageContent = {
      key: "about-page",
      content: {
        metaTitle: t({
          en: "About Us - My Company",
          fr: "À Propos - Ma Société",
          es: "Acerca de Nosotros - Mi Empresa",
        }),
        metaDescription: t({
          en: "Learn more about our company and our mission",
          fr: "En savoir plus sur notre société et notre mission",
          es: "Conozca más sobre nuestra empresa y nuestra misión",
        }),
        title: t({
          en: "About Us",
          fr: "À Propos",
          es: "Acerca de Nosotros",
        }),
      },
    } satisfies Dictionary;
    
    export default aboutPageContent;

    Git Configuration

    It is recommended to ignore the files generated by Intlayer. This allows you to avoid committing them to your Git repository.

    To do this, you can add the following instructions to your .gitignore file:

    .gitignore
    Copy code

    Copy the code to the clipboard

    # Ignore the files generated by Intlayer.intlayer

    VS Code Extension

    To improve your development experience with Intlayer, you can install the official Intlayer VS Code Extension.

    Install from the VS Code Marketplace

    This extension provides:

    • Autocompletion for translation keys.
    • Real-time error detection for missing translations.
    • Inline previews of translated content.
    • Quick actions to easily create and update translations.

    For more details on how to use the extension, refer to the Intlayer VS Code Extension documentation.


    Go Further

    To go further, you can implement the visual editor or externalize your content using the CMS.

    Vite and Vue
    Vite and Solid
    Alt+→

    In this page

      Discussions are anonymous and regularly reviewed to address common issues. Feel free to share feature ideas, feedback on the documentation, or anything related to Intlayer, we use this input to shape our roadmap and improve the product.

      npm install intlayer vue-intlayernpm install --save-dev nuxt-intlayernpx intlayer init
      import { defineNuxtConfig } from "nuxt/config";export default defineNuxtConfig({  // ... Your existing Nuxt configuration  modules: ["nuxt-intlayer"],});
      <script setup lang="ts">import { ref } from "vue";import { useIntlayer } from "vue-intlayer";defineProps({  msg: String,});const {  count,  edit,  checkOut,  nuxtIntlayer,  learnMore,  nuxtDocs,  readTheDocs,} = useIntlayer("helloworld");const countRef = ref(0);</script><template>  <h1>{{ msg }}</h1>  <div class="card">    <button type="button" @click="countRef++">      <count />      {{ countRef }}    </button>    <p v-html="edit"></p>  </div>  <p>    <checkOut />    <a href="https://nuxt.com/docs/getting-started/introduction" target="_blank"      >Nuxt</a    >, <nuxtIntlayer />  </p>  <p>    <learnMore />    <a href="https://nuxt.com" target="_blank"><nuxtDocs /></a>.  </p>  <p class="read-the-docs"><readTheDocs /></p>  <p class="read-the-docs">{{ readTheDocs }}</p></template>
      <script setup lang="ts">import { getLocaleName, getLocalizedUrl } from "intlayer";import { useLocale } from "vue-intlayer";// Nuxt auto-imports useRouteconst route = useRoute();const { locale, availableLocales, setLocale } = useLocale();</script><template>  <nav class="locale-switcher">    <NuxtLink      v-for="localeEl in availableLocales"      :key="localeEl"      :to="getLocalizedUrl(route.fullPath, localeEl)"      class="locale-link"      :class="{ 'active-locale': localeEl === locale }"      @click="setLocale(localeEl)"    >      {{ getLocaleName(localeEl) }}    </NuxtLink>  </nav></template>
      <template>  <NuxtLayout>    <NuxtPage />  </NuxtLayout></template>
      <script setup lang="ts">import Links from "~/components/Links.vue";import LocaleSwitcher from "~/components/LocaleSwitcher.vue";</script><template>  <div>    <header>      <LocaleSwitcher />    </header>    <main>      <slot />    </main>    <Links href="/">Home</Links>    <Links href="/about">About</Links>  </div></template>
      pages/├── index.vue          → /, /fr, /es├── about.vue          → /about, /fr/about, /es/about└── contact/    └── index.vue      → /contact, /fr/contact, /es/contact
      <script setup lang="ts">import { useIntlayer } from "vue-intlayer";const content = useIntlayer("home-page");useHead({  title: content.metaTitle.raw,  meta: [    {      name: "description",      content: content.metaDescription.raw,    },  ],});</script><template>  <h1><content.title /></h1></template>
      <script setup lang="ts">import { useIntlayer } from "vue-intlayer";const content = useIntlayer("about-page");useHead({  title: content.metaTitle.raw, // Use .raw for primitive string access  meta: [    {      name: "description",      content: content.metaDescription.raw, // Use .raw for primitive string access    },  ],});</script><template>  <h1><content.title /></h1></template>
      <script setup lang="ts">import { getLocalizedUrl } from "intlayer";import { useLocale } from "vue-intlayer";interface Props {  href: string;  locale?: string;}const props = defineProps<Props>();const { locale: currentLocale } = useLocale();// Compute the final pathconst finalPath = computed(() => {  // 1. Check if the link is external  const isExternal = /^https?:\/\//.test(props.href || "");  // 2. If external, return as is (NuxtLink handles the <a> tag generation)  if (isExternal) return props.href;  // 3. If internal, localize the URL  const targetLocale = props.locale || currentLocale.value;  return getLocalizedUrl(props.href, targetLocale);});</script><template>  <NuxtLink :to="finalPath" v-bind="$attrs">    <slot />  </NuxtLink></template>
      <script setup lang="ts">import Links from "~/components/Links.vue";import LocaleSwitcher from "~/components/LocaleSwitcher.vue";</script><template>  <div>    <header>      <LocaleSwitcher />    </header>    <main>      <slot />    </main>    <Links href="/">Home</Links>    <Links href="/about">About</Links>  </div></template>
      <script setup lang="ts">import { useIntlayer } from "vue-intlayer";// useHead is auto-imported in Nuxtconst content = useIntlayer("about-page");useHead({  title: content.metaTitle.raw, // Use .raw for primitive string access  meta: [    {      name: "description",      content: content.metaDescription.raw, // Use .raw for primitive string access    },  ],});</script><template>  <h1><content.title /></h1></template>
      # Ignore the files generated by Intlayer.intlayer