mirror of
https://github.com/lobehub/lobehub.git
synced 2026-03-26 13:19:34 +07:00
🔧 chore: Update i18n configuration to include entry and output locales
This commit updates the "locales" property in the "i18n" object of "next-i18next.config.js". It now includes the "entryLocale" and all the "outputLocales" using the spread operator. Additionally, the "localePath" property is set based on whether the code is running in a browser or not. The changes improve the i18n configuration by making it more flexible and dynamic.
This commit is contained in:
@@ -5,7 +5,7 @@ module.exports = {
|
||||
debug: process.env.NODE_ENV === 'development',
|
||||
i18n: {
|
||||
defaultLocale: i18n.entryLocale,
|
||||
locales: [i18n.entryLocale, i18n.outputLocales],
|
||||
locales: [i18n.entryLocale, ...i18n.outputLocales],
|
||||
},
|
||||
localePath:
|
||||
typeof window === 'undefined' ? require('node:path').resolve('./', i18n.output) : '/locales',
|
||||
|
||||
Reference in New Issue
Block a user