Skip to content

Commit

Permalink
Merge pull request #39 from c4dt/i18n
Browse files Browse the repository at this point in the history
Some cleaning of language initialisation
  • Loading branch information
ineiti authored Oct 10, 2023
2 parents 275862a + c1c3623 commit 3117283
Show file tree
Hide file tree
Showing 4 changed files with 5 additions and 6 deletions.
5 changes: 2 additions & 3 deletions web/frontend/src/language/Configuration.ts
Original file line number Diff line number Diff line change
Expand Up @@ -18,10 +18,9 @@ use(initReactI18next)
.use(LanguageDetector)
.init({
resources,
defaultNS: 'common',
fallbackLng: 'en',
fallbackLng: ['en', 'fr', 'de'],
debug: true,
interpolation: {
escapeValue: false, // react already safes from xss => https://www.i18next.com/translation-function/interpolation#unescape
escapeValue: false, // react already safe from xss => https://www.i18next.com/translation-function/interpolation#unescape
},
});
2 changes: 1 addition & 1 deletion web/frontend/src/language/de.json
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
{
"common": {
"translation": {
"Welcome to React": "Welcome to React and react-i18next",
"about": "This is the About text",
"en": "🇺🇸 Englisch",
Expand Down
2 changes: 1 addition & 1 deletion web/frontend/src/language/en.json
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
{
"common": {
"translation": {
"Welcome to React": "Welcome to React and react-i18next",
"navBarHome": "Home",
"navBarStatus": "Forms",
Expand Down
2 changes: 1 addition & 1 deletion web/frontend/src/language/fr.json
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
{
"common": {
"translation": {
"Welcome to React": "Welcome to React and react-i18next",
"about": "This is the About text",
"en": "🇺🇸 Anglais",
Expand Down

0 comments on commit 3117283

Please sign in to comment.