detect lang remote

This commit is contained in:
Gabe Yuan
2023-10-11 10:27:51 +08:00
parent dd99fddc07
commit 791ec65579
5 changed files with 35 additions and 2 deletions

View File

@@ -23,7 +23,7 @@ export function useTranslate(q, rule, setting) {
try {
setLoading(true);
const deLang = await tryDetectLang(q, true);
const deLang = await tryDetectLang(q, setting.detectRemote);
if (deLang && toLang.includes(deLang)) {
setSamelang(true);
} else {