This documentation is for a legacy version of Next.js and Supabase. For the latest version, please visit the Next.js and Supabase V2 documentation

Adding a new translation file | Next.js Supabase SaaS Kit

How to add a new translation file to your Next.js Supabase SaaS Kit application

To add a new translation to your application next to the default ones (common, auth, profile, etc.) you need to:

  1. create the new JSON file, for example tasks.json in the public/locales/<lang> folder
  2. add the new bundle name to the translations list in the src/i18n.settings.ts file:
export const defaultI18nNamespaces = [
'common',
'auth',
'organization',
'profile',
'subscription',
];

We add the tasks bundle name to the defaultI18nNamespaces:

export const defaultI18nNamespaces = [
'common',
'auth',
'organization',
'profile',
'subscription',
'tasks'
];

Now, refresh the dev server and your new bundled will be picked up by the i18n module.