# gradle-base **Repository Path**: beesoft/gradle-base ## Basic Information - **Project Name**: gradle-base - **Description**: No description available - **Primary Language**: Unknown - **License**: Not specified - **Default Branch**: master - **Homepage**: None - **GVP Project**: No ## Statistics - **Stars**: 0 - **Forks**: 0 - **Created**: 2025-10-26 - **Last Updated**: 2025-10-26 ## Categories & Tags **Categories**: Uncategorized **Tags**: None ## README # readme ## todo - 批量 - 导入导出 - 多语言切换 ## todo ```javascript const userLang = 'zh'; // 或从用户设置获取 fetch('/api/countries/code/CN') .then(res => res.json()) .then(country => { const titles = JSON.parse(country.title); document.title = titles[userLang]; // 显示 "中国" }); ``` ### 2. 语言选择器 ```javascript fetch('/api/languages') .then(res => res.json()) .then(languages => { const mainLanguages = languages.filter(l => !l.parentId); }); ``` ### 3. 区域设置 ```javascript fetch('/api/languages') .then(res => res.json()) .then(languages => { const zhLang = languages.find(l => l.code === 'zh'); const zhVariants = languages.filter(l => l.parentId === zhLang.id); // zhVariants: [zh-CN, zh-TW, zh-HK] }); ```