[dyad] Adding multi-language support - wrote 17 file(s), renamed 5 file(s), deleted 1 file(s), added next-international package(s)
This commit is contained in:
@@ -1,16 +1,44 @@
|
||||
"use client";
|
||||
|
||||
import Link from "next/link";
|
||||
import { Github, Twitter } from "lucide-react";
|
||||
import { Github, Twitter, Globe } from "lucide-react";
|
||||
import { Button } from "@/components/ui/button";
|
||||
import { changelogData } from "@/lib/changelog-data";
|
||||
import { changelogData } from "@/lib/changelog-config";
|
||||
import { useI18n, useChangeLocale } from "@/lib/i18n/client";
|
||||
import {
|
||||
DropdownMenu,
|
||||
DropdownMenuContent,
|
||||
DropdownMenuItem,
|
||||
DropdownMenuTrigger,
|
||||
} from "@/components/ui/dropdown-menu";
|
||||
|
||||
export function Footer() {
|
||||
const t = useI18n();
|
||||
const changeLocale = useChangeLocale();
|
||||
const latestVersion = changelogData[0]?.version;
|
||||
|
||||
return (
|
||||
<footer className="w-full border-t bg-background">
|
||||
<div className="container relative mx-auto flex h-16 items-center justify-between px-4 md:px-6">
|
||||
<div className="text-sm text-muted-foreground">
|
||||
<p>© {new Date().getFullYear()} Pascal Linxweiler</p>
|
||||
<div className="flex items-center gap-4">
|
||||
<DropdownMenu>
|
||||
<DropdownMenuTrigger asChild>
|
||||
<Button variant="ghost" size="icon" aria-label="Change language">
|
||||
<Globe className="h-4 w-4" />
|
||||
</Button>
|
||||
</DropdownMenuTrigger>
|
||||
<DropdownMenuContent align="start">
|
||||
<DropdownMenuItem onClick={() => changeLocale("en")}>
|
||||
English
|
||||
</DropdownMenuItem>
|
||||
<DropdownMenuItem onClick={() => changeLocale("de")}>
|
||||
Deutsch
|
||||
</DropdownMenuItem>
|
||||
</DropdownMenuContent>
|
||||
</DropdownMenu>
|
||||
<div className="text-sm text-muted-foreground hidden sm:block">
|
||||
<p>© {new Date().getFullYear()} Pascal Linxweiler</p>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<div className="absolute left-1/2 top-1/2 flex -translate-x-1/2 -translate-y-1/2 items-center gap-1">
|
||||
@@ -27,8 +55,8 @@ export function Footer() {
|
||||
</div>
|
||||
|
||||
<div className="flex items-center gap-4 text-sm text-muted-foreground">
|
||||
<Link href="/imprint" className="hover:text-primary transition-colors">Imprint</Link>
|
||||
<Link href="/privacy" className="hover:text-primary transition-colors">Privacy</Link>
|
||||
<Link href="/imprint" className="hover:text-primary transition-colors">{t('footer.imprint')}</Link>
|
||||
<Link href="/privacy" className="hover:text-primary transition-colors">{t('footer.privacy')}</Link>
|
||||
{latestVersion && (
|
||||
<Link
|
||||
href="/changelog"
|
||||
|
||||
Reference in New Issue
Block a user