Table of Contents

Namespace BlazOrbit.Localization

Classes

BobLocalizationBundleAttribute

Declares a localization bundle anchored to a marker TResource type. Applied at the assembly level (typically on the AssemblyInfo of a package that ships translations) so the source generator and runtime registry both discover the bundle without reflection in consumer code.

BobLocalizationBundleSpec

Immutable specification of a registered localization bundle. Built either by hand for runtime-only scenarios or - typically - by the source generator and supplied to RegisterBundle(BobLocalizationBundleSpec) from a [ModuleInitializer]-marked method inside the bundle's owning assembly.

BobLocalizationHash

FNV-1a 64-bit hash used to convert source literal strings to stable lookup keys at both build time (source generator) and runtime (dynamic-key slow path). The constants are the canonical reference values - do not "optimize" or change them or hashes computed in different builds will diverge.

BobLocalizationKeyRoute

Single key-routing rule: keys with Prefix consult ProviderType before the chain.

BobLocalizationKeyRouteAttribute

Routes any localization key starting with Prefix to a specific provider type before the rest of the bundle's Chain. Stacks on the same assembly as the bundle declaration; one attribute per prefix.

BobLocalizationOptions

Configuration knobs for the BOBLocalize runtime. Passed to the registration extension via the standard System.Action<T> pattern; immutable after build.

BobLocalize

Global registry of localization bundles. Each bundle's owning assembly registers itself via a [ModuleInitializer]-marked method emitted by the source generator; consumer code rarely touches this type directly.

BobLocalizerHtmlExtensions

HTML-aware helpers over Microsoft.Extensions.Localization.IStringLocalizer<T>. Use when a translation contains markup (e.g. <strong>, <br />) and the value must reach the DOM without Blazor's default HTML escaping.

BobLocalizer<T>

Adapter that exposes the BOBLocalize runtime as a Microsoft Microsoft.Extensions.Localization.IStringLocalizer<T>. Components and services continue to inject IStringLocalizer<TResource> exactly as they did with the resx-based stack - the registration in AddBlazOrbitLocalization(IServiceCollection, Action<BobLocalizationOptions>?) reroutes that resolution to this adapter.

CultureFlags

Default emoji flag lookup for the cultures most commonly used in BlazOrbit localization. The BOBCultureSelector components in BlazOrbit.Localization.Server / .Wasm call into this when the consumer does not supply a custom FlagResolver.

LocalizationSettings

Common host-side localization settings shared by the Server and WASM integrations. Concrete packages derive their host-specific subclass - ServerLocalizationSettings adds cookie configuration, WasmLocalizationSettings is a marker for symmetry - so that consumers referencing both packages can disambiguate without using aliases.

ServiceCollectionExtensions

DI registration for the BOBLocalize runtime. The single entry point - AddBlazOrbitLocalization(IServiceCollection, Action<BobLocalizationOptions>?) - wires the Microsoft.Extensions.Localization.IStringLocalizer<T> resolution to BobLocalizer<T> and registers the built-in providers.

Interfaces

IBobLocalizationBuilder

Fluent builder returned by AddBlazOrbitLocalization(IServiceCollection, Action<BobLocalizationOptions>?) so consumers can chain custom provider registrations without re-typing the service collection.

IBobLocalizationProvider

Pluggable backend that resolves a translation for a precomputed key hash. Implementations hold their own per-culture cache; the framework never wraps them in an external cache layer.