Class TlumachCultureSelector
Lets the user choose one of SupportedCultures.
In an interactive component, it is a select element that switches the language when the selection changes. In static server-side rendering,
it is a form that sends the choice to the culture endpoint (MapTlumachCultureEndpoint), which stores it in a cookie and reloads the page.
public sealed class TlumachCultureSelector : ComponentBase, IComponent, IHandleEvent, IHandleAfterRender
- Inheritance
-
TlumachCultureSelector
- Implements
- Inherited Members
Properties
AdditionalAttributes
Gets or sets the attributes applied to the select element.
[Parameter(CaptureUnmatchedValues = true)]
public IReadOnlyDictionary<string, object>? AdditionalAttributes { get; set; }
Property Value
DisplayName
Gets or sets the function that returns the label of a culture. By default, the native name of the culture is used.
[Parameter]
public Func<CultureInfo, string>? DisplayName { get; set; }
Property Value
ForceReload
Gets or sets a value indicating whether the page is reloaded after a switch so that all formatting uses the new culture.
[Parameter]
public bool ForceReload { get; set; }
Property Value
SubmitText
Gets or sets the text of the submit button of the form rendered in static server-side rendering.
[Parameter]
public string SubmitText { get; set; }
Property Value
Methods
BuildRenderTree(RenderTreeBuilder)
Renders the component to the supplied RenderTreeBuilder.
protected override void BuildRenderTree(RenderTreeBuilder builder)
Parameters
builderRenderTreeBuilderA RenderTreeBuilder that will receive the render output.