feat: 支持多语言能力

This commit is contained in:
2026-01-24 10:10:52 +08:00
parent 77c048b6a2
commit e2280b12e2
23 changed files with 2373 additions and 374 deletions

View File

@@ -0,0 +1,39 @@
import type { Metadata } from "next";
import { headers } from "next/headers";
export async function generateMetadata(): Promise<Metadata> {
const headersList = await headers();
const acceptLanguage = headersList.get("accept-language") || "";
const lang = acceptLanguage.includes("zh") ? "zh" : "en";
const titles = {
en: "Video to Frames - Extract Frames from Videos",
zh: "视频抽帧 - 从视频中提取帧",
};
const descriptions = {
en: "Extract frames from videos with customizable frame rates. Perfect for sprite animations and game asset preparation. Supports MP4, MOV, AVI, WebM.",
zh: "从视频中提取帧,可自定义帧率。非常适合精灵动画制作和游戏素材准备。支持 MP4、MOV、AVI、WebM。",
};
return {
title: titles[lang],
description: descriptions[lang],
openGraph: {
title: titles[lang],
description: descriptions[lang],
},
twitter: {
title: titles[lang],
description: descriptions[lang],
},
};
}
export default function VideoFramesLayout({
children,
}: {
children: React.ReactNode;
}) {
return children;
}