- Added next-intl for internationalization with Romanian as default locale - Restructured app directory with [locale] routing (/ro, /en) - Created comprehensive translation files for both languages - Fixed Next.js 15 async params compatibility in layout components - Updated all components to use proper i18n hooks and translations - Configured middleware for locale routing and fallbacks - Fixed FloatingChat component translation array handling - Restored complete home page with internationalized content - Fixed Material-UI Slide component prop error (mountOnExit → unmountOnExit) 🤖 Generated with [Claude Code](https://claude.ai/code) Co-Authored-By: Claude <noreply@anthropic.com>
55 lines
1.3 KiB
TypeScript
55 lines
1.3 KiB
TypeScript
import '../globals.css'
|
|
import type { Metadata } from 'next'
|
|
import { NextIntlClientProvider } from 'next-intl'
|
|
import { getMessages } from 'next-intl/server'
|
|
import { notFound } from 'next/navigation'
|
|
import { MuiThemeProvider } from '@/components/providers/theme-provider'
|
|
import { Navigation } from '@/components/layout/navigation'
|
|
import FloatingChat from '@/components/chat/floating-chat'
|
|
|
|
export const metadata: Metadata = {
|
|
title: 'Ghid Biblic - Biblical Guide',
|
|
description: 'A comprehensive Bible study application with AI chat capabilities',
|
|
}
|
|
|
|
export async function generateStaticParams() {
|
|
return [
|
|
{ locale: 'ro' },
|
|
{ locale: 'en' }
|
|
]
|
|
}
|
|
|
|
interface LocaleLayoutProps {
|
|
children: React.ReactNode
|
|
params: Promise<{ locale: string }>
|
|
}
|
|
|
|
const locales = ['ro', 'en']
|
|
|
|
export default async function LocaleLayout({
|
|
children,
|
|
params
|
|
}: LocaleLayoutProps) {
|
|
const { locale } = await params
|
|
|
|
// Validate locale
|
|
if (!locales.includes(locale)) {
|
|
notFound()
|
|
}
|
|
|
|
const messages = await getMessages()
|
|
|
|
return (
|
|
<html lang={locale}>
|
|
<body>
|
|
<NextIntlClientProvider messages={messages} locale={locale}>
|
|
<MuiThemeProvider>
|
|
<Navigation />
|
|
{children}
|
|
<FloatingChat />
|
|
</MuiThemeProvider>
|
|
</NextIntlClientProvider>
|
|
</body>
|
|
</html>
|
|
)
|
|
} |