mirror of
https://github.com/Nezumi-2711/onedrive-vercel-index.git
synced 2026-09-22 13:38:45 +00:00
add next-i18next as i18n framework
This commit is contained in:
@@ -0,0 +1,26 @@
|
||||
const path = require('path')
|
||||
|
||||
const { i18n, localePath } = require('./next-i18next.config')
|
||||
|
||||
module.exports = {
|
||||
input: ['**/*.{ts,tsx}', '!**/node_modules/**'],
|
||||
options: {
|
||||
sort: true,
|
||||
removeUnusedKeys: true,
|
||||
func: {
|
||||
list: ['t'],
|
||||
extensions: ['.ts', '.tsx']
|
||||
},
|
||||
lngs: i18n.locales,
|
||||
ns: ['common'],
|
||||
defaultLng: i18n.defaultLocale,
|
||||
defaultNs: 'common',
|
||||
defaultValue: (lng, _ns, key) => (lng === i18n.defaultLocale ? key : ''),
|
||||
resource: {
|
||||
loadPath: path.join(localePath, '{{lng}}/{{ns}}.json'),
|
||||
savePath: path.join(localePath, '{{lng}}/{{ns}}.json')
|
||||
},
|
||||
nsSeparator: false,
|
||||
keySeparator: false
|
||||
}
|
||||
}
|
||||
Reference in New Issue
Block a user