mcpField
N
nuxt-i18n

nuxt-i18n

github.com/onmaxDevelopment723607 installsUpdated today
Repository

About nuxt-i18n

A Nuxt I18n skill for developers configuring localization in Nuxt projects. It covers locale messages, localized routing, language detection, and metadata while keeping module, Vue I18n, and Nuxt responsibilities distinct.

Key features

  1. 01Inspect locale configuration
  2. 02Manage translated messages
  3. 03Configure localized routes
  4. 04Use localized links and composables
  5. 05Check rendering and SEO metadata

Use cases

  1. 01Adding locales to a Nuxt project
  2. 02Updating translations and interpolation
  3. 03Implementing locale switchers
  4. 04Verifying localized routes and metadata

Install

Copy the command and run it in a terminal.

$npx skills add https://github.com/onmax/nuxt-skills --skill nuxt-i18n

After installing, type/nuxt-i18nin Claude Code to confirm it loaded.

Bundled files

References and scripts installed along with SKILL.md.

agents/
openai.yaml
references/
configuration.md
messages.md
routing.md

Details

From the project README

Nuxt I18n

Nuxt I18n owns locale messages, localized routes, language detection, and locale metadata. Nuxt owns the surrounding page, rendering, and server lifecycle.

Workflow

  1. Inspect the installed @nuxtjs/i18n version, nuxt.config.*, i18n/i18n.config.*, locale files, and affected pages. The setup is understood when locale codes, files, defaultLocale, and the routing strategy agree.
  2. Open the smallest matching guide below. Keep module options in nuxt.config, Vue I18n options in i18n.config, and translated messages in locale files.
  3. Implement with localized links and module composables so routing, message loading, and SEO share one locale state.
  4. Run nuxi prepare and the project's typecheck, then visit the affected route in the default and one secondary locale. The change is complete when both locales render the expected message, URL, language metadata, and fallback behavior.

Routing

TaskOpen
Installation, locale objects, file layout, browser detection, or Vue I18n configConfiguration
Translation keys, interpolation, plurals, dates, numbers, or runtime message loadingMessages
Route strategies, localized links, switchers, custom paths, dynamic slugs, or SEORouting and SEO
Nuxt pages, middleware, data fetching, SSR state, or server routesnuxt skill

Baseline

npx nuxi@latest module add @nuxtjs/i18n
export default defineNuxtConfig({
  modules: ['@nuxtjs/i18n'],
  i18n: {
    defaultLocale: 'en',
    locales: [
      { code: 'en', language: 'en-US', name: 'English', file: 'en.json' },
      { code: 'fr', language: 'fr-FR', name: 'Français', file: 'fr.json' },
    ],
  },
})
{
  "welcome": "Welcome"
}

Locale files resolve from i18n/locales/ by default. Use the same locale code in configuration, route helpers, locale files, and fallback rules.

Comments

Markdown supported