Files
cursor-byok/apps/docs/lib/i18n.ts
T
leookun 217f984112 feat(docs): enhance documentation and UI consistency
- Updated the index.html to dynamically set the theme color based on user selection, improving user experience during theme switching.
- Modified proxy.ts to include 'icon.png' in the matcher for better asset handling.
- Added a new icon.png file for enhanced branding.
- Improved metadata in layout.tsx and page.tsx files for better clarity and consistency in documentation.
- Updated various documentation files to reflect the new branding of 'Cursor Byok' and ensure consistent terminology throughout.
- Removed outdated blog entries and added new content to better align with the current product direction.
2026-08-28 01:33:51 +08:00

27 lines
722 B
TypeScript

import { defineI18n } from 'fumadocs-core/i18n';
export const i18n = defineI18n({
defaultLanguage: 'zh',
languages: ['zh', 'en'],
// 所有语言显式带前缀;未带前缀的访问由中间件按浏览器 Accept-Language 协商后重定向
hideLocale: 'never',
});
export type Language = (typeof i18n)['languages'][number];
export function isLanguage(value: string): value is Language {
return i18n.languages.some((lang) => lang === value);
}
/** HTML `lang` attribute values. */
export const htmlLang: Record<Language, string> = {
zh: 'zh-CN',
en: 'en',
};
/** Locale ids understood by the desktop app / demo. */
export const demoLocale: Record<Language, string> = {
zh: 'zh-CN',
en: 'en-US',
};