Make the website interface support multiple languages for global accessibility
Implements i18n translations for Header component elements using `t` function and adds a missing translation in `ar.json`. Replit-Commit-Author: Agent Replit-Commit-Session-Id: 5a4f78b4-6a2e-4391-b005-5544e086dac8 Replit-Commit-Screenshot-Url: https://storage.googleapis.com/screenshot-production-us-central1/9777c70b-fc38-4831-8d6b-78dfffe041b0/c8675744-6bc9-4464-806b-f920c1471265.jpg
This commit is contained in:
@@ -65,7 +65,7 @@ export default function Header() {
|
|||||||
href="/dashboard"
|
href="/dashboard"
|
||||||
className="transition-colors hover:text-foreground/80 text-foreground"
|
className="transition-colors hover:text-foreground/80 text-foreground"
|
||||||
>
|
>
|
||||||
Dashboard
|
{t('navigation.dashboard')}
|
||||||
</Link>
|
</Link>
|
||||||
</nav>
|
</nav>
|
||||||
)}
|
)}
|
||||||
@@ -77,7 +77,7 @@ export default function Header() {
|
|||||||
{/* Voice Status Indicator */}
|
{/* Voice Status Indicator */}
|
||||||
<div className="flex items-center space-x-2 bg-muted/50 px-3 py-1 rounded-full">
|
<div className="flex items-center space-x-2 bg-muted/50 px-3 py-1 rounded-full">
|
||||||
<Activity className="w-3 h-3 text-green-500 animate-pulse" />
|
<Activity className="w-3 h-3 text-green-500 animate-pulse" />
|
||||||
<span className="text-xs text-muted-foreground hidden sm:inline">Voice Ready</span>
|
<span className="text-xs text-muted-foreground hidden sm:inline">{t('voice.ready')}</span>
|
||||||
</div>
|
</div>
|
||||||
|
|
||||||
{/* Language Switcher */}
|
{/* Language Switcher */}
|
||||||
@@ -132,26 +132,26 @@ export default function Header() {
|
|||||||
<DropdownMenuSeparator />
|
<DropdownMenuSeparator />
|
||||||
<DropdownMenuItem onClick={() => setLocation("/settings")}>
|
<DropdownMenuItem onClick={() => setLocation("/settings")}>
|
||||||
<Settings className="mr-2 h-4 w-4" />
|
<Settings className="mr-2 h-4 w-4" />
|
||||||
<span>Settings</span>
|
<span>{t('navigation.settings')}</span>
|
||||||
</DropdownMenuItem>
|
</DropdownMenuItem>
|
||||||
<DropdownMenuItem onClick={() => setLocation("/profile")}>
|
<DropdownMenuItem onClick={() => setLocation("/profile")}>
|
||||||
<User className="mr-2 h-4 w-4" />
|
<User className="mr-2 h-4 w-4" />
|
||||||
<span>Profile</span>
|
<span>{t('navigation.profile')}</span>
|
||||||
</DropdownMenuItem>
|
</DropdownMenuItem>
|
||||||
<DropdownMenuSeparator />
|
<DropdownMenuSeparator />
|
||||||
<DropdownMenuItem onClick={handleLogout}>
|
<DropdownMenuItem onClick={handleLogout}>
|
||||||
<LogOut className="mr-2 h-4 w-4" />
|
<LogOut className="mr-2 h-4 w-4" />
|
||||||
<span>Log out</span>
|
<span>{t('navigation.logout')}</span>
|
||||||
</DropdownMenuItem>
|
</DropdownMenuItem>
|
||||||
</DropdownMenuContent>
|
</DropdownMenuContent>
|
||||||
</DropdownMenu>
|
</DropdownMenu>
|
||||||
) : (
|
) : (
|
||||||
<div className="flex items-center space-x-2">
|
<div className="flex items-center space-x-2">
|
||||||
<Button variant="ghost" size="sm" onClick={() => setLocation("/login")}>
|
<Button variant="ghost" size="sm" onClick={() => setLocation("/login")}>
|
||||||
Sign In
|
{t('auth.login')}
|
||||||
</Button>
|
</Button>
|
||||||
<Button size="sm" onClick={() => setLocation("/login")}>
|
<Button size="sm" onClick={() => setLocation("/login")}>
|
||||||
Get Started
|
{t('auth.register')}
|
||||||
</Button>
|
</Button>
|
||||||
</div>
|
</div>
|
||||||
)}
|
)}
|
||||||
|
|||||||
@@ -234,7 +234,8 @@
|
|||||||
"voiceActivated": "مفعل صوتياً",
|
"voiceActivated": "مفعل صوتياً",
|
||||||
"speakingRate": "معدل الكلام",
|
"speakingRate": "معدل الكلام",
|
||||||
"voicePitch": "نبرة الصوت",
|
"voicePitch": "نبرة الصوت",
|
||||||
"voiceVolume": "مستوى الصوت"
|
"voiceVolume": "مستوى الصوت",
|
||||||
|
"ready": "الصوت جاهز"
|
||||||
},
|
},
|
||||||
"settings": {
|
"settings": {
|
||||||
"title": "الإعدادات",
|
"title": "الإعدادات",
|
||||||
|
|||||||
Reference in New Issue
Block a user