Automate Nuxt i18n Translations with AI

Babely translates your Nuxt locale JSON files while preserving linked keys, interpolation, and layout namespaces — the only Vue stack example in the Babely repo.

Why teams automate this

Vue i18n JSON files grow fast

Nuxt apps accumulate locale keys across layouts, pages, and components. Maintaining es.json, fr.json, and de.json by hand blocks every release.

Linked keys and arrays break easily

Nuxt i18n supports linked messages and array values. Generic translation tools flatten or corrupt these structures.

No CI sync with English source

When en.json changes, target locale files fall behind unless translation is part of your deploy pipeline.

How it works

1

Initialize Babely in your Nuxt project

Run init from your Nuxt project root and configure Babely to watch your i18n locale directory.

npx @babely/cli@latest init
2

Configure src/i18n/locales/[locale].json

Match the path @nuxtjs/i18n loads. Set your source locale and targets in babely.json.

{
  "locale": {
    "source": "en",
    "targets": ["es", "fr", "de", "sv"]
  },
  "files": {
    "json": {
      "include": ["src/i18n/locales/[locale].json"]
    }
  }
}
3

Translate changed keys

Run translate after editing English strings. Babely detects Git diff changes and updates only modified keys.

npx @babely/cli@latest translate
4

Wire into CI

Add Babely to your GitHub Action so locale files stay in sync before every Nuxt deploy.

# See docs/github-actions for the full workflow

Example babely.json

Copy this config into your project root and adjust targets to match your locale folders.

{
  "locale": {
    "source": "en",
    "targets": ["es", "fr", "de", "sv"]
  },
  "files": {
    "json": {
      "include": ["src/i18n/locales/[locale].json"]
    }
  }
}

Why Babely for Nuxt

Nuxt i18n JSON support

Babely handles the JSON format @nuxtjs/i18n expects, including nested layout and page namespaces.

Interpolation preserved

Placeholders and linked key references stay intact in translated locale files.

Multi-locale in one command

Translate into es, fr, de, sv and more target locales without manual copy-paste.

Git-aware workflow

Only changed keys are translated, keeping pull request diffs small and reviewable.

Start translating your Nuxt project

Set up Babely in minutes, automate translations in CI, and ship multilingual products without enterprise localization overhead.

Frequently Asked Questions

Does Babely work with @nuxtjs/i18n?

Yes. Babely manages locale JSON files on disk. Your Nuxt i18n module configuration and lazy-loading setup continue to work unchanged.

Can I use a different locale directory path?

Yes. Update the include path in babely.json to match your project structure, for example i18n/locales/[locale].json.

Does Babely support Nuxt 3 and Nuxt 4?

Yes. Babely is format-agnostic — it translates JSON locale files regardless of your Nuxt version.

Does Babely replace @nuxtjs/i18n?

No. Babely automates translation file generation. Nuxt i18n still handles routing, lazy loading, and runtime locale switching.

Nästa steg

Leverera varje språk från samma pipeline.

Logga in med GitHub eller Google, koppla din arbetsyta och synka översättningar via CLI eller CI/CD så att varje uppdatering rullas ut på alla språk utan att sakta ner era releaser.

Börja automatisera

3-day free trial