Namespace Miloun.Cosmo
Classes
CollationOptions
Collation tailoring, mirroring the other ports' collation option bag.
Cosmo
Cosmo — application localisation for .NET.
A thin, ergonomic layer over ICU (reached through the native ICU4C library). It bundles no locale data of its own — every result comes straight from ICU. Construct once per locale and reuse.
A few ICU4J features have no ICU C binding and therefore throw
CosmoUnsupportedException: PersonName(IDictionary<string, string>, string, string) (needs
ICU 73+), IndexBuckets(IEnumerable<string>) (AlphabeticIndex is C++-only),
BestMatch(IEnumerable<string>) / negotiated FromAcceptLanguage(string, IEnumerable<string>)
(no C LocaleMatcher), and SupportedValues("unit").
CosmoArgumentException
A caller passed an invalid argument — an unknown currency code, an unsupported width/unit, a bad enum value, and so on.
CosmoException
Base exception for Cosmo. Catch this to handle any library error; catch a subclass to distinguish the cause.
CosmoUnsupportedException
The underlying ICU build exposes no API for the requested operation. Environmental, not a caller bug — and on the C API a few ICU4J features (person names, alphabetic index, CLDR-distance matching) simply have no C binding.
Modifiers
Optional overrides resolved at construction: calendar, currency
and timeZone. Any field may be null (meaning "derive from the
locale, or unavailable").
NumberOptions
Portable number-formatting controls, mirroring the option bag the other
Cosmo ports accept. Any property left null keeps ICU's default.
Subtags
Parsed language / script / region subtags of a locale. Empty when absent.
WeekInfo
Week conventions for a locale's region. Days use ISO-8601 numbering
(1 = Monday … 7 = Sunday), matching the JS port's Intl convention.