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:
Felipe Cardoso
2025-11-19 01:31:51 +01:00
parent 0b192ce030
commit 333c9c40af
9 changed files with 110 additions and 2 deletions

View File

@@ -23,6 +23,7 @@ import { Avatar, AvatarFallback } from '@/components/ui/avatar';
import { Settings, LogOut, User, Shield } from 'lucide-react';
import { cn } from '@/lib/utils';
import { ThemeToggle } from '@/components/theme';
import { LocaleSwitcher } from '@/components/i18n';
/**
* Get user initials for avatar
@@ -92,9 +93,10 @@ export function Header() {
</nav>
</div>
{/* Right side - Theme toggle and user menu */}
{/* Right side - Theme toggle, locale switcher, and user menu */}
<div className="ml-auto flex items-center space-x-2">
<ThemeToggle />
<LocaleSwitcher />
<DropdownMenu>
<DropdownMenuTrigger asChild>
<Button variant="ghost" className="relative h-10 w-10 rounded-full">