From b27777b625fb348f35e435276842668e16456967 Mon Sep 17 00:00:00 2001
From: NtskwK <natsukawa247@outlook.com>
Date: Tue, 3 Feb 2026 11:19:09 +0800
Subject: feat(i18n): add multi-language support for docs

---
 packages/docs/app/lib/layout.shared.tsx | 17 ++++++++++++++++-
 1 file changed, 16 insertions(+), 1 deletion(-)

(limited to 'packages/docs/app/lib/layout.shared.tsx')

diff --git a/packages/docs/app/lib/layout.shared.tsx b/packages/docs/app/lib/layout.shared.tsx
index 6c7a35d..6e90ba0 100644
--- a/packages/docs/app/lib/layout.shared.tsx
+++ b/packages/docs/app/lib/layout.shared.tsx
@@ -1,9 +1,24 @@
 import type { BaseLayoutProps } from 'fumadocs-ui/layouts/shared';
+import { i18n } from './i18n';
 
-export function baseOptions(): BaseLayoutProps {
+export function baseOptions(locale: string): BaseLayoutProps {
+  // 默认语言（zh）不显示前缀，其他语言显示前缀
+  const isDefaultLocale = locale === i18n.defaultLanguage;
+  const localePrefix = isDefaultLocale ? '' : `/${locale}`;
+  
   return {
+    i18n,
     nav: {
       title: 'DropOut',
+      url: localePrefix || '/',
     },
+    githubUrl: 'https://github.com/HydroRoll-Team/DropOut',
+    links: [
+      {
+        type: 'main',
+        text: locale === 'zh' ? '文档' : 'Documentation',
+        url: `${localePrefix}/docs`,
+      },
+    ],
   };
 }
-- 
cgit v1.2.3-70-g09d2

