-
Notifications
You must be signed in to change notification settings - Fork 324
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Signed-off-by: Michael Robinson <merobi@gmail.com>
- Loading branch information
1 parent
0f857c5
commit be75a05
Showing
6 changed files
with
218 additions
and
3 deletions.
There are no files selected for viewing
Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.
Oops, something went wrong.
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,8 @@ | ||
{ | ||
"dependencies": { | ||
"@types/react": "^18.0.25", | ||
"i18next": "^22.0.6", | ||
"i18next-browser-languagedetector": "^7.0.1", | ||
"react-i18next": "^12.0.0" | ||
} | ||
} |
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
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,46 @@ | ||
import i18n from 'i18next'; | ||
import { initReactI18next } from 'react-i18next'; | ||
import LanguageDetector from 'i18next-browser-languagedetector'; | ||
|
||
i18n | ||
// detect user language | ||
// learn more: https://github.com/i18next/i18next-browser-languageDetector | ||
.use(LanguageDetector) | ||
// pass the i18n instance to react-i18next. | ||
.use(initReactI18next) | ||
// init i18next | ||
// for all options read: https://www.i18next.com/overview/configuration-options | ||
.init({ | ||
debug: true, | ||
fallbackLng: 'en', | ||
interpolation: { | ||
escapeValue: false, // not needed for react as it escapes by default | ||
}, | ||
resources: { | ||
en: { | ||
translation: { | ||
// here we will place our translations... | ||
header: 'API Docs', | ||
JobTab1: 'LATEST RUN', | ||
JobTab2: 'RUN HISTORY' | ||
} | ||
}, | ||
fr: { | ||
translation: { | ||
header: 'API Docs', | ||
JobTab1: 'DERNIÈRE COURSE', | ||
JobTab2: "HISTORIQUE D'EXECUTION" | ||
} | ||
}, | ||
sp: { | ||
translation: { | ||
header: 'API Docs', | ||
JobTab1: 'ÚLTIMA EJECUCIÓN', | ||
JobTab2: 'HISTORIAL DE EJECUCIONES' | ||
} | ||
} | ||
|
||
} | ||
}); | ||
|
||
export default i18n; |
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