🌐 Added i18next

This commit is contained in:
Mawoka
2022-03-25 18:23:41 +01:00
parent 326780c8d7
commit 8f8e152c32
16 changed files with 4457 additions and 2495 deletions
@@ -0,0 +1,37 @@
module.exports = {
options: {
debug: true,
// read strings from functions: IllegalMoveError('KEY') or t('KEY')
func: {
list: ['IllegalMoveError', 't'],
extensions: ['.js', '.svelte']
},
trans: false,
// Create and update files `en.json`, `fr.json`, `es.json`
lngs: ['en', 'de'],
ns: [
// The namespace I use
'translation'
],
defaultLng: 'en',
defaultNs: 'translation',
// Put a blank string as initial translation
// (useful for Weblate be marked as 'not yet translated', see later)
defaultValue: (lng, ns, key) => '',
// Location of translation files
resource: {
loadPath: 'src/lib/i18n/locales/{{lng}}.json',
savePath: 'src/lib/i18n/locales/{{lng}}.json',
jsonIndent: 4
},
nsSeparator: ':',
keySeparator: '.'
}
};