Skip to content

Commit 3665f6d

Browse files
authored
explainer: add private tag language fallback note
1 parent 4ebb535 commit 3665f6d

File tree

1 file changed

+1
-0
lines changed

1 file changed

+1
-0
lines changed

explainer.md

+1
Original file line numberDiff line numberDiff line change
@@ -553,6 +553,7 @@ However, we aren't aware of any recognizer implementations that falls within thi
553553
Web developers may provide subtags (e.g. region and script). The implementation should interpret them, and choose fallbacks if necessary. In general:
554554

555555
* If the provided language tag doesn't match any recognizer, remove the last subtag until there is a match. For example, `"zh-Hans-CN"` -> `"zh-Hans"` -> `"zh"`.
556+
* If the provided language tag contains private tags (e.g. "zxx-x-shape"), the private tags shouldn't be removed. The implementation should take private tags into consideration when matching recognizers.
556557
* If the browser can't match any recognizer (after the above fallbacks), `createHandwritingRecognizer` rejects with an Error.
557558

558559
If language model constraints aren't provided, the implementation should reject the promise with an error.

0 commit comments

Comments
 (0)