I finally released two low-level crates for Unicode Language Identifier and Unicode Locale Identifier management.
The code was previously part of
fluent-locale together with Fluent’s language negotiation algorithm.
Now, with the extraction you can target pure Language Identifier or Locale Identifier parsing/manipulation/serialization and you only use
fluent-locale-rs if you want our language negotiation.
unic-langid is fairly complete for well-formed identifiers, but doesn’t handle validation (conformance with existing list of tags).
unic-locale is more experimental and handles a couple first basic Unicode Extensions and private extensions, but not Transform Extensions.
I’d love to get help with making those crates faster and lighter, as I expect them to end up deep in the chain of any localization/internationalization crates, which in turn will likely be needed for any GUI.
Enjoy and help me bring it to full UTS35 conformance!