Skip to content

Localization is one of those features that looks simple on the surface but quickly becomes messy if it’s not implemented correctly. In Blazor Web Applications, doing it the right way ensures consistent UI text, correct culture handling, and a clean user experience.

License

Notifications You must be signed in to change notification settings

mafzal88/BlazorLocalization

Repository files navigation

Why This Repository?

Localization in Blazor is often shown in fragments. This project provides a complete, working, and production-friendly setup for English–Arabic localization in a Blazor Web App using .NET 10.

Blazor Localization (English – Arabic)

A simple and practical example of implementing localization in a Blazor Web Application using .NET 10.

This project demonstrates:

  • English (en-US) and Arabic (ar-SA) localization
  • Resource-based localization using .resx
  • Culture switching with cookies
  • Proper calendar handling (Gregorian & Um Al-Qura)

License .NET Stars Last Commit

Tech Stack

  • .NET 10
  • Blazor Web App
  • ASP.NET Core Localization
  • JavaScript Interop

Supported Languages

  • English (en-US)
  • Arabic (ar-SA)

How It Works

  • Localization is implemented using IStringLocalizer
  • Shared resources are stored in .resx files
  • Culture selection is persisted using .AspNetCore.Culture cookie
  • UI reloads automatically after language change

Preview

English

English UI

Arabic

Arabic UI


Running the Project

  1. Clone the repository
    git clone https://github.com/mafzal88/BlazorLocalization.git
    
  2. Open the solution in Visual Studio 2026
  3. Run the project

Who Should Use This?

  • Blazor developers building multilingual apps
  • Teams targeting Arabic-speaking regions
  • Developers learning ASP.NET Core localization

About

Localization is one of those features that looks simple on the surface but quickly becomes messy if it’s not implemented correctly. In Blazor Web Applications, doing it the right way ensures consistent UI text, correct culture handling, and a clean user experience.

Topics

Resources

License

Stars

Watchers

Forks

Packages

No packages published