This repository has been archived by the owner on Apr 15, 2019. It is now read-only.
-
Notifications
You must be signed in to change notification settings - Fork 60
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #705 from LiskHQ/558-implement-localization
Implement localization - closes #558
- Loading branch information
Showing
10 changed files
with
71 additions
and
7 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
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
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,37 @@ | ||
import i18n from 'i18next'; | ||
import XHR from 'i18next-xhr-backend'; | ||
// import Cache from 'i18next-localstorage-cache'; | ||
|
||
i18n | ||
.use(XHR) | ||
// .use(Cache) | ||
.init({ | ||
fallbackLng: 'en', | ||
lng: 'en', | ||
react: { | ||
// wait: true, // globally set to wait for loaded translations in translate hoc | ||
// exposeNamespace: true // exposes namespace on data-i18next-options to be used in eg. | ||
}, | ||
|
||
// have a common namespace used around the full app | ||
ns: ['common'], | ||
defaultNS: 'common', | ||
|
||
debug: true, | ||
|
||
// cache: { | ||
// enabled: true, | ||
// }, | ||
|
||
interpolation: { | ||
escapeValue: false, // not needed for react!! | ||
formatSeparator: ',', | ||
format: (value, format) => { | ||
if (format === 'uppercase') return value.toUpperCase(); | ||
return value; | ||
}, | ||
}, | ||
}); | ||
|
||
|
||
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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,4 @@ | ||
{ | ||
"send": "senden", | ||
"logout": "Ausloggen" | ||
} |
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,4 @@ | ||
{ | ||
"send": "send", | ||
"logout": "logout" | ||
} |
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