How to use the next-i18next function in next-i18next

To help you get started, we’ve selected a few next-i18next examples, based on popular ways it is used in public projects.

Secure your code as it's written. Use Snyk Code to scan source code in minutes - no build needed - and fix issues immediately.

github SolidZORO / leaa / packages / leaa-www / i18n.ts View on Github external
import NextI18Next from 'next-i18next';

const NextI18NextInstance = new NextI18Next({
  defaultNS: 'common',
  defaultLanguage: 'zh-CN',
  fallbackLng: 'zh-CN',
  otherLanguages: ['en-US'],
  whitelist: ['en-US', 'zh-CN', 'zh', 'en'],
  localeSubpaths: 'foreign',
  // load: 'currentOnly',
  keySeparator: '###',
  serverLanguageDetection: true,
  browserLanguageDetection: true,
});

export default NextI18NextInstance;

export const {
  appWithTranslation,
github pankod / next-boilerplate / server / i18n.ts View on Github external
// #region Global Imports
import NextI18Next from "next-i18next";
// #endregion Global Imports

const NextI18NextInstance = new NextI18Next({
    defaultLanguage: "en",
    otherLanguages: ["es", "tr"],
});

export const { appWithTranslation, withTranslation } = NextI18NextInstance;

export default NextI18NextInstance;
github pythonkr / pyconkr-web / i18n.ts View on Github external
import NextI18Next from 'next-i18next'

const NextI18NextInstance = new NextI18Next({
  defaultLanguage: 'ko',
  otherLanguages: ['en']
})

export default NextI18NextInstance

/* Optionally, export class methods as named exports */
export const {
  appWithTranslation,
  withNamespaces,
  i18n
} = NextI18NextInstance
github myungjaeyu / nextjs-starter / i18n.js View on Github external
import NextI18Next from 'next-i18next'

const NextI18NextInstance = new NextI18Next({
    defaultLanguage: 'en',
    otherLanguages: ['ko']
})

export default NextI18NextInstance
github celo-org / celo-monorepo / packages / web / src / i18n.ts View on Github external
import NextI18Next, { I18nProps as i18nProps } from 'next-i18next'

const options = { defaultLanguage: 'en', otherLanguages: ['en'], saveMissing: false }
const NextI18NextInstance = new NextI18Next(options)

export const Trans = NextI18NextInstance.Trans

export interface I18nProps {
  t: i18nProps['t']
  i18n: i18nProps['i18n']
}

export default NextI18NextInstance
export const { appWithTranslation, withNamespaces } = NextI18NextInstance

export enum NameSpaces {
  common = 'common',
  about = 'about',
  applications = 'applications',
  brand = 'brand',

next-i18next

The easiest way to translate your NextJs apps.

MIT
Latest version published 12 days ago

Package Health Score

95 / 100
Full package analysis