The hidden cost of adding i18n to Next.js
You built a Next.js app. It works. Then someone asks for Spanish, German, and Japanese — and suddenly you're deep in routing rewrites, locale middleware, and duplicated page structures.
Internationalization in Next.js is famously invasive. Whether you use the App Router or Pages Router, most solutions force you to restructure how URLs work, move files, and touch every Link component.
This guide compares the common approaches and shows why SiteLocaleAI is the fastest path for teams that want translations without rebuilding routing.
Approach 1: next-intl (the popular standard)
next-intl is excellent. It's built for Next.js, supports Server Components, and handles plurals, dates, and rich text well.
But it comes with a structural commitment: you must nest routes under app/[locale]/. That means:
// app/[locale]/page.tsx
export default function Page({ params: { locale } }) {
return <h1>{useTranslations('Home')('title')}</h1>;
}
You also need middleware to detect and redirect locales, and you must update every internal link to pass the locale. For a mature app, this is a multi-week refactor.
Best for: greenfield projects that plan for i18n from day one.
Approach 2: i18next + react-i18next
Classic and flexible. You configure i18next, load JSON resource files, and wrap components with useTranslation.
const { t } = useTranslation('common');
return <p>{t('welcome')}</p>;
It doesn't force routing changes — but it also doesn't help with SEO. Search engines see one language unless you manually add hreflang, pre-render locale pages, or set up separate domains. Managing hundreds of JSON keys across languages becomes a maintenance burden, and price formatting per currency is entirely on you.
Best for: dashboards and internal tools where SEO doesn't matter.
Approach 3: Domain or subdomain routing
Some teams avoid [locale] folders by using es.example.com or example.com/es. It works, but now you're managing DNS, SSL certificates per subdomain, and complex redirect rules. Deployment and analytics get messier.
Best for: enterprises with existing multi-domain infrastructure.
The real problem: you already have a working app
All three approaches assume you can afford to restructure. But most teams have production code, a design system, and customers. They can't pause for a routing migration.
What they actually need is:
- A drop-in layer that translates existing content
- No changes to file structure or Link usage
- Localized pricing that respects currency psychology
- SEO-friendly output without a separate infra project
That's exactly what SiteLocaleAI was built for.
How SiteLocaleAI works with Next.js
SiteLocaleAI is a self-hosted JavaScript library. You add one script tag or import, connect your own LLM API key (Claude, GPT-4o-mini, etc.), and it translates the DOM at runtime.
<script src="https://cdn.sitelocaleai.com/v1.js"
data-api-key="YOUR_LLM_KEY"
data-locales="es,de,ja">
</script>
No [locale] folder. No middleware. No refactoring every component. It works with React, Vue, WordPress, Shopify — anything that renders HTML.
Price localization that converts
SiteLocaleAI doesn't just convert currency — it applies psychological rounding per currency. $49 might become €49 or ¥4,980 instead of €45.23, which lifts conversion.
SEO pre-rendering via CLI
Runtime translation alone isn't enough for SEO. SiteLocaleAI includes a CLI that pre-renders fully translated, indexed pages so Google sees every locale. You get proper hreflang tags without manual work.
npx sitelocaleai prerender --out ./public/locales
WordPress plugin included
If part of your site runs WordPress, there's a no-Node.js plugin. Same self-hosted model, same LLM keys.
Side-by-side comparison
| Feature | next-intl | i18next | SiteLocaleAI |
|---|---|---|---|
| Routing changes required | Yes | No | No |
| SEO pre-rendering | Manual | Manual | Built-in CLI |
| Price localization | No | No | Yes, per-currency |
| Self-hosted LLM keys | N/A | N/A | Yes |
| Framework agnostic | No | Partial | Yes |
Why SiteLocaleAI wins for existing Next.js apps
If you're starting from scratch and love file-based routing, next-intl is great. But if you have a live Next.js app and want to go international this week, SiteLocaleAI is the only option that doesn't force a routing rewrite.
You keep your app structure. You keep your links. You keep your sanity. And you get localized pricing and SEO-ready translated pages out of the box.
Try it on your Next.js app
Install the library, add your LLM key, and see your site in a new language in minutes. Start with the quickstart guide and pick a plan — from $5 Indie to $249 Enterprise.