BUNDLEWARE

context.detectLanguage

Context

The language text is in, by the browser's own language identifier, offline: a BCP 47 code such as 'fr' or 'zh-Hant', or '' where it cannot tell. Only the first 4,000 characters are read.

Signaturecontext.detectLanguage(text: string): Promise<string>
Take it fromconst { detectLanguage } = useToolbar();

Parameters

ParameterTypeDescription
textstring

Return Value

TypePromise<string>

Availability

Bundleware1.0.1, build 2026.12.02