detect lang remote

This commit is contained in:
Gabe Yuan
2023-10-10 18:03:05 +08:00
parent 5af66204c4
commit 5cd6977a6e
5 changed files with 77 additions and 6 deletions

View File

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