- Implemented astro-i18next for multi-language support, including English, Dutch, and Italian. - Configured default locale and language fallback settings. - Defined routes for localized content in the configuration. - Updated package.json and package-lock.json to include new dependencies for i18next and related plugins.
56 lines
1.3 KiB
JavaScript
56 lines
1.3 KiB
JavaScript
import { defineConfig } from 'astro/config';
|
|
import tailwind from '@astrojs/tailwind';
|
|
import astroI18next from 'astro-i18next';
|
|
|
|
// https://astro.build/config
|
|
export default defineConfig({
|
|
site: 'https://tiber365.it',
|
|
integrations: [
|
|
tailwind(),
|
|
astroI18next({
|
|
defaultLocale: "en",
|
|
locales: ["en", "nl", "it"],
|
|
i18next: {
|
|
debug: true,
|
|
initImmediate: false,
|
|
supportedLngs: ["en", "nl", "it"],
|
|
fallbackLng: "en",
|
|
load: "all"
|
|
},
|
|
i18nextPlugins: { fsBackend: 'i18next-fs-backend' },
|
|
showDefaultLocale: true,
|
|
routes: {
|
|
en: {
|
|
about: 'about',
|
|
services: 'services',
|
|
contact: 'contact',
|
|
privacy: 'privacy',
|
|
terms: 'terms'
|
|
},
|
|
nl: {
|
|
about: 'over-ons',
|
|
services: 'diensten',
|
|
contact: 'contact',
|
|
privacy: 'privacy',
|
|
terms: 'voorwaarden'
|
|
},
|
|
it: {
|
|
about: 'chi-siamo',
|
|
services: 'servizi',
|
|
contact: 'contatti',
|
|
privacy: 'privacy',
|
|
terms: 'termini'
|
|
}
|
|
}
|
|
}),
|
|
],
|
|
output: 'static',
|
|
build: {
|
|
inlineStylesheets: 'auto',
|
|
},
|
|
vite: {
|
|
optimizeDeps: {
|
|
exclude: ['astro:content']
|
|
}
|
|
}
|
|
});
|