Skip to content
This repository has been archived by the owner on Feb 2, 2019. It is now read-only.

Latest commit

 

History

History
28 lines (18 loc) · 940 Bytes

README.md

File metadata and controls

28 lines (18 loc) · 940 Bytes

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