windows/nuxt.config.ts

39 lines
843 B
TypeScript
Raw Normal View History

2025-09-23 16:43:57 +00:00
// https://nuxt.com/docs/api/configuration/nuxt-config
export default defineNuxtConfig({
devtools: { enabled: true },
2025-09-24 09:45:36 +00:00
// Register modules
2025-09-23 16:43:57 +00:00
modules: [
'@pinia/nuxt',
2025-09-24 09:45:36 +00:00
'@nuxtjs/i18n',
2025-09-23 16:43:57 +00:00
],
2025-09-24 09:45:36 +00:00
// i18n configuration
i18n: {
strategy: 'no_prefix', // No URL prefix for locales
locales: [
{
code: 'en',
2025-09-25 02:56:23 +00:00
name: 'English',
file: 'en.json'
2025-09-24 09:45:36 +00:00
},
{
2025-09-25 02:10:57 +00:00
code: 'zh',
2025-09-25 02:56:23 +00:00
name: '繁體中文',
file: 'zh-TW.json'
2025-09-24 09:45:36 +00:00
}
],
2025-09-25 02:10:57 +00:00
defaultLocale: 'zh', // Set default language to Traditional Chinese
2025-09-25 02:56:23 +00:00
langDir: 'lang/',
lazy: true, // Enable lazy loading of language files
2025-09-25 02:10:57 +00:00
detectBrowserLanguage: {
useCookie: true,
2025-09-25 02:56:23 +00:00
cookieKey: 'i18n_redirected',
2025-09-25 02:10:57 +00:00
fallbackLocale: 'zh'
}
2025-09-24 09:45:36 +00:00
},
2025-09-23 16:43:57 +00:00
// Global CSS - We will import this in app.vue instead
css: [],
})