A library to provide localisation in client-side Blazor applications
Switch branches/tags
Nothing to show
Clone or download
Fetching latest commit…
Cannot retrieve the latest commit at this time.
Permalink
Type Name Latest commit message Commit time
Failed to load latest commit information.
assets
sample/LocalisationSample
src/BlazoredLocalisation
.gitignore
BlazoredLocalisation.sln
LICENSE
README.md

README.md

BlazoredLocalisation

A library to provide localisation in client-side Blazor applications

NuGet

Installing

You can install from Nuget using the following command:

Install-Package BlazoredLocalisation

Or via the Visual Studio package manger.

Setup

You just need to add app.UseBrowserLocalisation(); in your startup.cs file as per the example below.

public void Configure(IBlazorApplicationBuilder app)
{
    app.UseBrowserLocalisation();
    app.AddComponent<App>("app");
}

This will set the CultureInfo.CurrentCulture and CultureInfo.CurrentUICulture for your Blazor application based on the language settings of the clients browser.

Screenshot of BlazorLocalisation