Skip to main content

Module detect

Module detect 

Source
Expand description

Workshop client-language detection and explicit locale override.

Detection scores each catalog-declared locale by how many distinct localized builtin/struct/enum aliases appear in the input text. With the v0.2 en-US catalog this confirms English Workshop input; adding locales is a data-pipeline change that makes cross-locale ranking meaningful. Ambiguous or low-confidence input fails explicitly rather than selecting arbitrarily, and an explicit locale always bypasses detection.

Structs§

Detection
A language-detection result with ranked evidence.

Constants§

MIN_MATCHES
The minimum distinct-match count required to trust a detection.

Functions§

detect
Detect the Workshop client language of the input.
resolve_locale
Resolve a locale for parsing: an explicit override always wins; otherwise auto-detect and require a confident, unambiguous match.