-
Notifications
You must be signed in to change notification settings - Fork 294
Expand file tree
/
Copy pathi18next.config.ts
More file actions
30 lines (27 loc) · 857 Bytes
/
i18next.config.ts
File metadata and controls
30 lines (27 loc) · 857 Bytes
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
import { defineConfig } from 'i18next-cli';
export default defineConfig({
locales: ['de', 'en', 'es', 'fr', 'hi', 'it', 'ja', 'ko', 'nl', 'pt', 'ru', 'tr'],
extract: {
defaultNS: false,
extractFromComments: false,
functions: ['t', '*.t'],
ignore: ['./src/**/__tests__/**', './src/mock-builders/**'],
input: ['./src/**/*.{tsx,ts}'],
keySeparator: false,
nsSeparator: false,
output: 'src/i18n/{{language}}.json',
preservePatterns: [
// to preserve a whole group
'timestamp/*',
// or exact key if you want :
// 'timestamp/DateSeparator',
// or if you’re using explicit namespaces:
// 'translation:timestamp/DateSeparator',
],
removeUnusedKeys: false,
},
types: {
input: ['locales/{{language}}/{{namespace}}.json'],
output: 'src/types/i18next.d.ts',
},
});