Files
life-echo/app-expo/i18next.config.ts

22 lines
585 B
TypeScript

import { defineConfig } from 'i18next-cli';
export default defineConfig({
locales: ['zh', 'en'],
extract: {
input: ['src/**/*.{ts,tsx}'],
output: 'src/i18n/locales/{{language}}/{{namespace}}.json',
defaultNS: 'common',
functions: ['t', '*.t', 'i18n.t'],
transComponents: ['Trans'],
useTranslationNames: ['useTranslation'],
sort: true,
indentation: 2,
removeUnusedKeys: true,
},
types: {
input: ['src/i18n/locales/en/*.json'],
output: 'src/i18n/generated/i18next.d.ts',
resourcesFile: 'src/i18n/generated/resources.ts',
},
});