Registers and prepares rules once, defaulting to English. Omitting rules registers bundled alphabetic locales; omitting textLocales as well adds Chinese typography. Explicit rules and textLocales supply their own registrations instead of the respective defaults. Copies excluded words. Invalid configuration and duplicate locales throw. A missing default locale throws unless unsupportedLocale is preserve.
Compiles and registers rules for the plugin's locale, replacing any previous registration. Successful registration clears cached words for all locales in this instance. Compilation or validation errors propagate and leave the previous rules and cached words intact.
Registers or atomically replaces a typography-only locale and clears the shared word cache. An explicit hyphenation category selection throws because no algorithm data is supplied.
Formats text synchronously using the requested locale or the configured default. An override affects only this call. Unregistered locales throw by default, even for empty text. With unsupportedLocale preserve, valid unregistered locales return the exact source string. Preserves excluded words, recognized addresses, identifiers, unsupported words, and existing soft hyphens. With the same locale and configuration, bundled formatting leaves its own output unchanged; custom rules may not. Bundled rules preserve extra whitespace and supplied nonbreaking spaces; bindings require same-line content. Quote spacing uses narrow nonbreaking spaces by default for English and Russian. Reuses cached results for the same locale and exact source word when caching is enabled.
Reports whether rules are registered; validates and normalizes the locale without regional fallback.
Removes registered rules and reports whether the locale was present. Clears cached words for all locales only when rules were removed. Removing the default locale makes calls without an override follow unsupportedLocale.
Applies selected symbolic text rules before soft hyphenation using registered locale data. Custom locale types can be inferred from configured plugins or declared as a generic union.
Example