Polyglot detects your public/locales catalogs and namespaced hooks, then merges new keys into the files your app already loads — no parallel catalog, no broken lookups.
Most next-i18next projects aren't starting from zero — they have public/locales/en/common.json, namespaced useTranslation() hooks, maybe typed keys. The dangerous failure mode for any automation is writing keys somewhere your app never loads. Polyglot is built to be a guest in your catalog world instead.
import { useTranslation } from 'next-i18next';
export default function Home() {
const { t } = useTranslation();
return (
<main>
<h1>Welcome back</h1>
<p>{t('title')}</p>
</main>
);
}import { useTranslation } from 'next-i18next';
export default function Home() {
const { t } = useTranslation();
return (
<main>
<h1>{t('welcome_back')}</h1>
<p>{t('title')}</p>
</main>
);
}Notice the call is t('welcome_back') — relative, because your component's t is bound to a namespace. Polyglot reads useTranslation('ns') arguments and keyPrefix options and generates keys that resolve through the exact translator each component binds.
{
"title": "Meine App",
"welcome_back": "Welcome back"
}{
"title": "My App",
"welcome_back": "Welcome back"
}defaultNS and localePath from next-i18next.config.js are honored.CustomTypeOptions deriving from your JSON) type-check after wrap, because the key really is in the catalog the types derive from.$ curl -fsSL https://getpolyglot.ai/install.sh | bash
$ polyglot init --framework nextjs
$ polyglot scan
$ polyglot wrap
$ polyglot translate --languages de # 50 strings free, no signupThe dry run prints every planned change and writes nothing. If Polyglot can't resolve where a key should live, it flags the string with a recipe instead of guessing.
Start in your terminal
Install the CLI, run a scan, and see exactly what you're missing. Free, no account required.