mirror of
https://gh-proxy.org/https://github.com/klinsmaya/SQLBot.git
synced 2026-11-10 10:16:55 +08:00
feat(i18n): add Thai (th-TH) language support
Frontend: - Add frontend/src/i18n/th-TH.json (913 keys, full parity with zh-CN) - Register th-TH in i18n entry with native element-plus-secondary Thai locale - Add Thai option to language selectors, legacy th_TH alias mapping, and browser locale detection (th* -> th-TH) - Add common.thai label to all existing locale files Backend: - Add backend/locales/th-TH.json (177 keys) - Accept th-TH in language whitelist, schema regex, and MCP question - Map th* to Thai language name in LLM prompt language selection - Apply question language to guess-question prompt template
This commit is contained in:
@@ -52,6 +52,9 @@ export const getBrowserLocale = () => {
|
||||
const temp = language.toLowerCase().replace('_', '-')
|
||||
return temp === 'zh' ? 'zh-CN' : temp === 'zh-cn' ? 'zh-CN' : 'zh-TW'
|
||||
}
|
||||
if (language.toLowerCase().startsWith('th')) {
|
||||
return 'th-TH'
|
||||
}
|
||||
return language
|
||||
}
|
||||
export const getLocale = () => {
|
||||
|
||||
Reference in New Issue
Block a user