Add locale switcher component and integrate internationalization improvements
- Introduced `LocaleSwitcher` component for language selection with support for locale-aware dropdown and ARIA accessibility. - Updated layouts (`Header`, `Breadcrumbs`, `Home`) to include the new locale switcher. - Expanded localization files (`en.json`, `it.json`) with new keys for language switching. - Adjusted i18n configuration to enhance routing and message imports. - Updated Jest module mappings to mock new i18n components and utilities.
This commit is contained in:
@@ -32,7 +32,7 @@ export default getRequestConfig(async ({ locale }) => {
|
||||
|
||||
// Load messages for the requested locale
|
||||
// Dynamic import ensures only the requested locale is loaded
|
||||
messages: (await import(`../../messages/${validLocale}.json`)).default,
|
||||
messages: (await import(`../../../messages/${validLocale}.json`)).default,
|
||||
|
||||
// Optional: Configure time zone
|
||||
// This will be used for date/time formatting
|
||||
|
||||
Reference in New Issue
Block a user