- 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>
14 lines
399 B
TypeScript
14 lines
399 B
TypeScript
import {getRequestConfig} from 'next-intl/server';
|
|
|
|
// Can be imported from a shared config
|
|
export const locales = ['ro', 'en'];
|
|
|
|
export default getRequestConfig(async ({locale}) => {
|
|
// Ensure locale has a value, default to 'ro' if undefined
|
|
const validLocale = locale || 'ro';
|
|
|
|
return {
|
|
locale: validLocale,
|
|
messages: (await import(`./messages/${validLocale}.json`)).default
|
|
};
|
|
}); |