🌐 Add full i18n system frontend + API (Story 1.3)
Nuxt i18n with lazy-loaded JSON files, localized routes, hreflang SEO tags, LanguageSwitcher component. Laravel SetLocale middleware, HasTranslations trait, API Resources and Controllers for projects/skills with Accept-Language support. Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
This commit is contained in:
@@ -24,9 +24,25 @@ export default defineNuxtConfig({
|
||||
},
|
||||
|
||||
i18n: {
|
||||
locales: ['fr', 'en'],
|
||||
locales: [
|
||||
{ code: 'fr', iso: 'fr-FR', file: 'fr.json', name: 'Français' },
|
||||
{ code: 'en', iso: 'en-US', file: 'en.json', name: 'English' },
|
||||
],
|
||||
defaultLocale: 'fr',
|
||||
strategy: 'prefix_except_default',
|
||||
lazy: true,
|
||||
langDir: '../i18n/',
|
||||
detectBrowserLanguage: false,
|
||||
pages: {
|
||||
'projets/index': { en: '/projects' },
|
||||
'projets/[slug]': { en: '/projects/[slug]' },
|
||||
'competences': { en: '/skills' },
|
||||
'temoignages': { en: '/testimonials' },
|
||||
'parcours': { en: '/journey' },
|
||||
'contact': { en: '/contact' },
|
||||
'resume': { en: '/resume' },
|
||||
},
|
||||
baseUrl: process.env.NUXT_PUBLIC_SITE_URL || 'https://skycel.fr',
|
||||
},
|
||||
|
||||
app: {
|
||||
|
||||
Reference in New Issue
Block a user