Detect language

This commit is contained in:
ekzyis 2022-12-25 02:32:49 +01:00
parent cec84c29b0
commit b4354a9fdb
1 changed files with 1 additions and 1 deletions

View File

@ -59,7 +59,7 @@ const sleep = (ms) => new Promise((r) => setTimeout(r, ms));
const btn = document.createElement("button");
btn.innerText = "Translate";
btn.onclick = async (e) => {
const t = await translate(content.innerText, "en", "es").catch(
const t = await translate(content.innerText, "auto", "en").catch(
console.error
);
if (t) content.innerText = t;