formaui-net.Framework.Culture.Browser.Interop
1.0.0-preview.27
Prefix Reserved
dotnet add package formaui-net.Framework.Culture.Browser.Interop --version 1.0.0-preview.27
NuGet\Install-Package formaui-net.Framework.Culture.Browser.Interop -Version 1.0.0-preview.27
<PackageReference Include="formaui-net.Framework.Culture.Browser.Interop" Version="1.0.0-preview.27" />
<PackageVersion Include="formaui-net.Framework.Culture.Browser.Interop" Version="1.0.0-preview.27" />
<PackageReference Include="formaui-net.Framework.Culture.Browser.Interop" />
paket add formaui-net.Framework.Culture.Browser.Interop --version 1.0.0-preview.27
#r "nuget: formaui-net.Framework.Culture.Browser.Interop, 1.0.0-preview.27"
#:package formaui-net.Framework.Culture.Browser.Interop@1.0.0-preview.27
#addin nuget:?package=formaui-net.Framework.Culture.Browser.Interop&version=1.0.0-preview.27&prerelease
#tool nuget:?package=formaui-net.Framework.Culture.Browser.Interop&version=1.0.0-preview.27&prerelease
Forma.Framework.Culture.Browser.Interop
The page's culture coordinator: one per document, it orders every culture switch on the page, gives each
the next number in the document's sequence, and delivers the accepted pair to the culture state of every
runtime registered with it, each Interactive Server circuit and WebAssembly runtime on the page, so they
converge on one pair. It
keeps the page's <html lang dir> on the accepted pair, so a page switched to Hebrew in place is laid out
right to left and read as Hebrew by browsers and screen readers.
The coordinator runs on the page state synchronizer of formaui-net.Framework.State.Browser.Interop, which comes with
this package and orders every setting the whole page shares.
Use it
The package comes with formaui-net.Blazor, whose AddFormaUIServices() registers it through
AddFormaCultureCoordination(), and formaui-net.Framework.Culture.Blazor.Server's circuit handler
registers each circuit with it, as formaui-net.Framework.Culture.Blazor.WebAssembly's startup registers
each WebAssembly runtime:
| Service | Registered as |
|---|---|
ICultureState |
Forma's own state, scoped, through AddFormaCultureServices(). |
ICultureStateIntegration |
The same instance as the scope's ICultureState, through AddFormaCultureServices(). |
CultureCoordinatorRegistration |
Scoped, one per user scope. |
Each is added with TryAdd, so a host's own registration made first is the one used.
CultureCoordinatorRegistration.RegisterAsync() registers the scope's state with the coordinator, which
adopts the pair the page accepted, and CoordinatedCultureSwitch requests each switch through it. The
coordinator delivers each pair by its names, and the registration hands the state the application's
ICultureProvider's culture for each name, or the platform's where none is registered; a delivery the
provider fails is logged as an error under CultureCoordinatorRegistration.
The coordinator starts from the culture marker FormaPageHead publishes in the page's head, the cultures
the server rendered the page in; a page without it can't be coordinated, and every registration fails
with an error naming FormaPageHead. CultureSwitchPolicy, which the page publishes beside the marker,
says how a switch persists: in the states alone, by default, or also in request localization's culture
cookie, which the coordinator writes in its c=…|uic=… serialization and reads back before it accepts
the switch. AddFormaCultureSwitchPolicy(policy) registers it, refusing a cookie a browser can't keep, and
CulturePublication gives the marker's and the policy's attributes as the page publishes them. A
standalone app's page has no server, so its runtime registers with a CultureCoordinatorStart carrying
both, which the coordinator starts from on a page whose load initialized nothing. A web view's page starts
the same way, under a policy whose attributes GetPolicyAttributes gives:
- A coordinated web view's document, given
follows: true, isWebView: true, follows the pair an application's coordinator accepts, whichCultureCoordinatorRegistration.FollowAsynchands it, rather than accepting one of its own. Each call takes its place as it is made, so the document keeps the pair of the latest call, whatever order the calls reach it in. - The document of a web view holding a culture of its own, given
isWebView: truealone, accepts its own switches.
Where the scope's services carry an ICultureDestinationSource that ResolvesDestinations, as culture
routing's does once a host registers a destination resolver, the coordinator asks the registration for the
address each switch by address navigates to, and each address a following document moves to, through the
source's ResolveAsync; a source that names none, or throws, leaves the page's own address in the route,
and one that throws is logged as an error under CultureCoordinatorRegistration.
A switch completes once its own runtime's state has applied the pair it accepted. Each switch takes its place among its runtime's switches as it is made, so one that reaches the coordinator after a later one, as two made while the runtime registers can, completes as canceled and changes nothing. An enhanced navigation's landing changes the page's pair to the one its response was rendered in, and a switch requested while a navigation is in flight waits for it to land. The package's JavaScript initializer, which Blazor loads on its own, starts the coordinator and releases a circuit's registrations as the client closes the circuit.
License
Apache License 2.0, under the repository's LICENSE.
| Product | Versions Compatible and additional computed target framework versions. |
|---|---|
| .NET | net11.0 is compatible. |
-
net11.0
- formaui-net.Framework.Culture (= 1.0.0-preview.27)
- formaui-net.Framework.Events (= 1.0.0-preview.27)
- formaui-net.Framework.JavaScript.Interop (= 1.0.0-preview.27)
- formaui-net.Framework.State.Browser.Interop (= 1.0.0-preview.27)
- Microsoft.Extensions.Logging (>= 11.0.0)
- Microsoft.JSInterop (>= 11.0.0)
NuGet packages (7)
Showing the top 5 NuGet packages that depend on formaui-net.Framework.Culture.Browser.Interop:
| Package | Downloads |
|---|---|
|
formaui-net.Blazor
A Blazor component library for .NET 11: form inputs and pickers, dialogs, popovers and toasts, toolbars and menus, tabs and layout, file pickers, uploaders and viewers, icons, emoji and windows. |
|
|
formaui-net.Framework.Culture.Blazor.WebAssembly
What the culture state needs from a WebAssembly client: the runtime's state registered with the page's culture coordinator of Forma.Framework.Culture.Browser.Interop as the runtime starts, before it renders, and each pair the state applies set as the process's default cultures too, so an event, a timer or any work the runtime starts after a switch runs in the new pair. |
|
|
formaui-net.Framework.Culture.Blazor.Server
What the culture state needs from an Interactive Server host: a circuit handler that sets CultureInfo.CurrentCulture and CultureInfo.CurrentUICulture from the circuit's culture state before every inbound activity, each UI event and each call from script into .NET, and registers the circuit's state with the page's culture coordinator of Forma.Framework.Culture.Browser.Interop as each connection comes up, before the circuit renders. |
|
|
formaui-net.Blazor.Server
The server half of Forma's component library: what a host that renders on the server needs beside the components, the document head FormaPageHead and the registration that adds the interactive server circuit's integrations. |
|
|
formaui-net.Blazor.WebAssembly
The WebAssembly half of Forma's component library: the registration a WebAssembly client makes, which registers what the components need in the browser and the culture a WebAssembly runtime keeps. |
GitHub repositories
This package is not used by any popular GitHub repositories.
| Version | Downloads | Last Updated |
|---|---|---|
| 1.0.0-preview.27 | 67 | 12/3/2026 |
| 1.0.0-preview.26 | 80 | 12/3/2026 |
| 1.0.0-preview.25 | 80 | 12/2/2026 |
| 1.0.0-preview.24 | 105 | 12/1/2026 |
| 1.0.0-preview.23 | 145 | 11/30/2026 |
| 1.0.0-preview.22 | 142 | 11/30/2026 |
| 1.0.0-preview.21 | 153 | 11/29/2026 |
| 1.0.0-preview.20 | 156 | 11/26/2026 |
| 1.0.0-preview.19 | 157 | 11/26/2026 |
| 1.0.0-preview.18 | 149 | 11/26/2026 |
| 1.0.0-preview.17 | 133 | 11/26/2026 |
| 1.0.0-preview.16 | 135 | 11/24/2026 |
| 1.0.0-preview.15 | 129 | 11/23/2026 |
| 1.0.0-preview.14 | 132 | 11/23/2026 |
| 1.0.0-preview.13 | 126 | 11/21/2026 |
| 1.0.0-preview.12 | 129 | 11/20/2026 |
| 1.0.0-preview.11 | 126 | 11/18/2026 |
| 1.0.0-preview.10 | 134 | 11/17/2026 |
| 1.0.0-preview.9 | 167 | 11/17/2026 |
| 1.0.0-preview.8 | 137 | 11/17/2026 |
What this release changed is in Forma's changelog: https://github.com/FormaUI/Forma/blob/v1.0.0-preview.27/CHANGELOG.md