-
Notifications
You must be signed in to change notification settings - Fork 16
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
1 parent
24e3d7b
commit 498521c
Showing
164 changed files
with
1,535 additions
and
2,607 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,32 +1,32 @@ | ||
import path from 'path'; | ||
import LanguageDetector from 'i18next-browser-languagedetector'; | ||
import NextI18Next from 'next-i18next'; | ||
import { initReactI18next } from 'react-i18next'; | ||
import getConfig from '../tenant.config'; | ||
// import path from 'path'; | ||
// import LanguageDetector from 'i18next-browser-languagedetector'; | ||
// import NextI18Next from 'next-i18next'; | ||
// import { initReactI18next } from 'react-i18next'; | ||
// import getConfig from '../tenant.config'; | ||
|
||
const config = getConfig(); | ||
// const config = getConfig(); | ||
|
||
export default new NextI18Next({ | ||
use: [LanguageDetector, initReactI18next], | ||
localePath: path.resolve('./public/static/locales'), | ||
defaultLanguage: config.languages[0] ? config.languages[0] : 'en', | ||
fallbackLng: config.languages[0] ? config.languages[0] : 'en', | ||
debug: false, | ||
otherLanguages: config.languages, // list all languages here | ||
detection: { | ||
// check if language is cached in local storage, otherwise retrieve from browser language | ||
order: ['localStorage', 'navigator'], | ||
// export default new NextI18Next({ | ||
// use: [LanguageDetector, initReactI18next], | ||
// localePath: path.resolve('./public/static/locales'), | ||
// defaultLanguage: config.languages[0] ? config.languages[0] : 'en', | ||
// fallbackLng: config.languages[0] ? config.languages[0] : 'en', | ||
// debug: false, | ||
// otherLanguages: config.languages, // list all languages here | ||
// detection: { | ||
// // check if language is cached in local storage, otherwise retrieve from browser language | ||
// order: ['localStorage', 'navigator'], | ||
|
||
// next-i18next by default searches for the 'next-i18next' cookie, local storage key on server requests | ||
lookupLocalStorage: 'language', | ||
// // next-i18next by default searches for the 'next-i18next' cookie, local storage key on server requests | ||
// lookupLocalStorage: 'language', | ||
|
||
// cache the language local storage | ||
caches: ['localStorage'], | ||
}, | ||
react: { | ||
// trigger a rerender when language is changed | ||
bindI18n: 'languageChanged', | ||
// we're NOT using suspsense to detect when the translations have loaded | ||
useSuspense: false, | ||
}, | ||
}); | ||
// // cache the language local storage | ||
// caches: ['localStorage'], | ||
// }, | ||
// react: { | ||
// // trigger a rerender when language is changed | ||
// bindI18n: 'languageChanged', | ||
// // we're NOT using suspsense to detect when the translations have loaded | ||
// useSuspense: false, | ||
// }, | ||
// }); |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,10 @@ | ||
const path = require('path'); | ||
|
||
module.exports = { | ||
i18n: { | ||
fallbackLng: 'en', | ||
defaultLocale: 'en', | ||
locales: ['en', 'de', 'cs', 'es', 'fr', 'it', 'pt-BR'], | ||
}, | ||
localePath: path.resolve('./public/static/locales'), | ||
}; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.