39 lines
843 B
TypeScript
39 lines
843 B
TypeScript
// https://nuxt.com/docs/api/configuration/nuxt-config
|
|
export default defineNuxtConfig({
|
|
devtools: { enabled: true },
|
|
|
|
// Register modules
|
|
modules: [
|
|
'@pinia/nuxt',
|
|
'@nuxtjs/i18n',
|
|
],
|
|
|
|
// i18n configuration
|
|
i18n: {
|
|
strategy: 'no_prefix', // No URL prefix for locales
|
|
locales: [
|
|
{
|
|
code: 'en',
|
|
name: 'English',
|
|
file: 'en.json'
|
|
},
|
|
{
|
|
code: 'zh',
|
|
name: '繁體中文',
|
|
file: 'zh-TW.json'
|
|
}
|
|
],
|
|
defaultLocale: 'zh', // Set default language to Traditional Chinese
|
|
langDir: 'lang/',
|
|
lazy: true, // Enable lazy loading of language files
|
|
detectBrowserLanguage: {
|
|
useCookie: true,
|
|
cookieKey: 'i18n_redirected',
|
|
fallbackLocale: 'zh'
|
|
}
|
|
},
|
|
|
|
// Global CSS - We will import this in app.vue instead
|
|
css: [],
|
|
})
|