From ecbb8227c348a2439fb6c9e890f9eef223285ab3 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=E9=87=91=E4=B8=9C=E5=8B=8B=20=7C=20=E9=87=91=E6=9D=B1?= =?UTF-8?q?=E5=8B=B3=20=7C=20=EA=B9=80=EB=8F=99=ED=9B=88=20=7C=20Jin=20Don?= =?UTF-8?q?gxun?= Date: Tue, 10 Nov 2026 16:32:34 +0800 Subject: [PATCH] Update the language matching examples to use Translator --- index.bs | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/index.bs b/index.bs index 3dadc2f..a52d934 100644 --- a/index.bs +++ b/index.bs @@ -234,7 +234,7 @@ A language arc is a [=tuple=] of two strings, a function a(sourceLanguage, targetLanguage) { - return ai.translator.availability({ sourceLanguage, targetLanguage }): + return Translator.availability({ sourceLanguage, targetLanguage }); } await a("en", "zh-Hans") === "available"; @@ -274,7 +274,7 @@ A language arc is a [=tuple=] of two strings, a ai.translator.create({ sourceLanguage: "en", targetLanguage: "fr" }), the [$LookupMatchingLocaleByBestFit$] algorithm would choose one of the three possible language arcs to use (presumably ("`en`", "`fr-FR`")). + In the latter case, if the web developer requested to create a translator using Translator.create({ sourceLanguage: "en", targetLanguage: "fr" }), the [$LookupMatchingLocaleByBestFit$] algorithm would choose one of the three possible language arcs to use (presumably ("`en`", "`fr-FR`")).