UNPKG

modified-next-i18next

Version:

A slightly modified version of next-i18next to allow for different folder structure.

34 lines (32 loc) 835 B
const DEFAULT_LOCALE = 'en'; const LOCALES = ['en']; const DEFAULT_NAMESPACE = 'common'; const LOCALE_PATH = './public/locales'; const LOCALE_STRUCTURE = '{{lng}}/{{ns}}'; const LOCALE_EXTENSION = 'json'; export const defaultConfig = { defaultNS: DEFAULT_NAMESPACE, errorStackTraceLimit: 0, i18n: { defaultLocale: DEFAULT_LOCALE, locales: LOCALES }, get initImmediate() { return process.browser && typeof window !== 'undefined'; }, interpolation: { escapeValue: false, format: (value, format) => format === 'uppercase' ? value.toUpperCase() : value, formatSeparator: ',' }, load: 'currentOnly', localeExtension: LOCALE_EXTENSION, localePath: LOCALE_PATH, localeStructure: LOCALE_STRUCTURE, react: { useSuspense: true }, serializeConfig: true, strictMode: true, use: [] };