Secure your code as it's written. Use Snyk Code to scan source code in minutes - no build needed - and fix issues immediately.
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,
// #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;
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
import NextI18Next from 'next-i18next'
const NextI18NextInstance = new NextI18Next({
defaultLanguage: 'en',
otherLanguages: ['ko']
})
export default NextI18NextInstance
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',