mirror of
https://wget.la/https://github.com/leookun/cursor-byok
synced 2026-10-03 18:23:51 +08:00
- 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.
27 lines
722 B
TypeScript
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',
|
|
};
|