Nuxt.js Site Translated Overnight with One Config File
Taking your Nuxt.js marketing site global usually means weeks of manual translation, broken layouts, and SEO headaches. But what if you could translate your entire site overnight—without touching a single Vue component?
With SiteLocaleAI, you can. It's a self-hosted JavaScript library that integrates with any framework, including Nuxt.js. You bring your own LLM API key (Claude, GPT-4o-mini, etc.), drop in one config file, and wake up to a fully localized site with translated pages, localized prices, and SEO-ready pre-rendered routes.
Here's how to do it.
Why Nuxt.js + SiteLocaleAI?
Nuxt.js is great for marketing sites: fast, SEO-friendly, and flexible. But internationalization (i18n) is still a manual chore. You either pay for a translation service or spend hours wiring up vue-i18n and managing JSON files.
SiteLocaleAI flips that. It's framework-agnostic and works with Nuxt 2 and 3 (including static and SSR modes). You don't need to refactor your components. Just add the library, configure your LLM key, and let it handle the rest.
Step 1: Install the Library
npm install sitelocaleai
Or if you prefer CDN:
<script src="https://cdn.sitelocaleai.com/v1/sitelocale.min.js"></script>
Step 2: Create One Config File
In your Nuxt project root, create sitelocale.config.js:
// sitelocale.config.js
export default {
provider: 'openai', // or 'anthropic', 'groq', etc.
apiKey: process.env.LLM_API_KEY,
sourceLocale: 'en',
targetLocales: ['es', 'fr', 'de', 'ja'],
priceLocalization: {
enabled: true,
rounding: 'psychological', // e.g., $9.99 → €9.99
},
seo: {
preRender: true, // generates static translated pages for crawlers
},
};
That's it. No component changes, no i18n JSON files.
Step 3: Add the Plugin to Nuxt
In your nuxt.config.js (or nuxt.config.ts), add SiteLocaleAI as a plugin:
// nuxt.config.js
export default {
plugins: [
{ src: '~/plugins/sitelocale.client.js', mode: 'client' },
],
};
Create plugins/sitelocale.client.js:
import SiteLocale from 'sitelocaleai';
import config from '~/sitelocale.config.js';
export default ({ app }) => {
SiteLocale.init(config);
};
Step 4: Run the CLI for SEO Pre-rendering
Search engines need static, translated HTML. SiteLocaleAI's CLI does that automatically:
npx sitelocale prerender --config sitelocale.config.js
This generates dist/es/, dist/fr/, etc., with fully translated pages, meta tags, and localized prices. No Node.js required for WordPress users—but for Nuxt, it's a single command.
What About Dynamic Content and Prices?
SiteLocaleAI automatically detects text nodes and attributes. For prices, it uses psychological rounding per currency. For example, $49 becomes €49 in France (not €45.32), which converts better.
You can also manually mark elements for translation:
<p data-sitelocale>Welcome to our site</p>
Or exclude them:
<p data-sitelocale-ignore>This stays in English</p>
Deploy and Wake Up Global
Push your changes, deploy as usual (Vercel, Netlify, or your own server), and SiteLocaleAI will translate on the fly for users and pre-render for bots. You can even schedule a nightly build to pick up new content.
Why Self-Hosted Matters
You control your LLM API keys. That means no per-word fees, no vendor lock-in, and full data privacy. Whether you use Claude, GPT-4o-mini, or a local model, you're in charge. SiteLocaleAI is a one-time purchase: $5 Indie, $49 Starter, $99 Growth, or $249 Enterprise.
Final Thoughts
Translating a Nuxt.js marketing site doesn't have to be a multi-week project. With SiteLocaleAI, it's one config file and an overnight build. You get localized prices, SEO-optimized pre-rendered pages, and a global audience—without refactoring your code.
Ready to go global? Get started with SiteLocaleAI and translate your Nuxt site tonight.