Expand description
§cranpose-localization
Immutable Fluent catalogs, scoped translators, and source extraction for Cranpose.
Enable cranpose’s localization feature for tr!, translations!, and
ProvideLocalization. The standalone formatter has no UI dependency.
Structs§
- Argument
- A named value passed to a message without allocating a string for numbers.
- Catalog
- Immutable, shareable parsed catalogs. Replacing a catalog replaces its cache identity.
- Deferred
Message - A message captured outside composition and translated when displayed.
Borrowed arguments become owned; cloning a request shares their storage.
Use
message!to construct one with checked source text and named arguments. - Language
- A supported application language and its native display name.
- Locale
- A validated language tag and optional localization preview.
- Localization
- Shared application localization used by UI roots, workers, and native services. Each thread retains only its most recently used formatter. Language changes invalidate that formatter; repeated messages do not reconstruct Fluent bundles.
- Message
- A static message definition emitted by
tr!or generated catalog bindings. - Resource
- One embedded or application-loaded Fluent resource.
- Source
Catalog - Source-language messages shared by generated accessors and parsed on first use.
- Translator
- A thread-owned formatter with no cross-thread locks during formatting.
Construct one from a shared
Catalogon each thread that needs translations.
Enums§
- Fluent
Value - Values accepted by generated message accessors, including borrowed text and numbers.
The
FluentValueenum represents values which can be formatted to a String. - Language
Preference - A saved application language choice, independent of the current system locale.
- Localization
Error - A catalog, locale, or message could not be used.
- Preview
Mode - A visual stress test applied after message formatting.
Traits§
- Language
Preference Store - An application’s storage adapter for its language preference. Native UI providers call these methods on a worker so storage cannot block a frame.